Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YamlDotNet does not write accurately equal to yaml being loaded #892

Closed
lx1988 opened this issue Jan 17, 2024 · 2 comments
Closed

YamlDotNet does not write accurately equal to yaml being loaded #892

lx1988 opened this issue Jan 17, 2024 · 2 comments

Comments

@lx1988
Copy link

lx1988 commented Jan 17, 2024

Example input file any scene from Unity3D. Example code:

var input = new StringReader(File.ReadAllText("Scene1.unity"));
var yaml = new YamlStream();
yaml.Load(input);
var tw = File.CreateText(sc.path + ".yaml");
yaml.Save(tw,false);
Verification shell command:
diff Scene1.unity Scene1.unity.yaml
^ got totally different result
image

@EdwardCooke
Copy link
Collaborator

Please post an example reproduction of the yaml for the problem.

@EdwardCooke
Copy link
Collaborator

This is probably due to aliases being enabled by default. Use disablealiases or something like that in your serializerbuilder and it should match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants