Closed nahk-ivanov closed 2 weeks ago
I’d have to check the yaml spec for utf 32, if there even is a spec for utf32. but that would probably be a simple change for serialiazing. Not sure about deserializing though. We do accept pr’s so if you want to submit one with applicable tests then I would be happy to merge it in. I was hoping to get a new version out last week but didn’t so I’m hoping for this weekend.
I think deserialization was already fixed here: https://github.com/aaubry/YamlDotNet/issues/838
Describe the bug When using JSON-compatible serializer (
new SerializerBuilder().JsonCompatible()
), it produces\Uxxxxxxxx
for UTF-32 special characters (https://github.com/aaubry/YamlDotNet/blob/master/YamlDotNet/Core/Emitter.cs#L1192-L1193), which seems to be against the JSON spec, which expects two 2-byte code points instead:\uxxxx\uxxxx
(also note lower-caseu
).This prevents the JSON from being parsed as such by Newtonsoft.JSON library or anything else.
To Reproduce
Actual:
Expected: