YamlDotNet icon indicating copy to clipboard operation
YamlDotNet copied to clipboard

YamlDotNet does not write accurately equal to yaml being loaded

Open lx1988 opened this issue 1 year ago • 1 comments

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

lx1988 avatar Jan 17 '24 10:01 lx1988

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

EdwardCooke avatar Jan 17 '24 17:01 EdwardCooke

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

EdwardCooke avatar Jul 08 '24 03:07 EdwardCooke