Closed ccfoo242 closed 2 years ago
This is intentional, and not the only case where such warnings would be generated (for example, external and internal graph references also do so). Odin Serializer does not produce entirely up-to-spec json, as there is no true interoperability with other json serializers anyways due to the heavy metadata annotations the serializer adds and requires. It is meant primarily to serve as a human-readable format.
If you do want to use this to post to other services that read vanilla json, then yes, I would just serialize a straight string instead. However, I would mostly advise you to use a more vanilla json serializer for such things, like Unity's JsonUtility or Newtonsoft.Json, as those do not have the peculiarities of Odin's json format that supporting all of the serializer's features requires we add.
Ok, thanks for the info!
Hey there, I noticed that a guid I have in my serialized object causes several editors (VS 2022, VS Code, Notepad++) to whine about an invalid character sequence.
Is there an option somewhere to force it to quote the guid value or serialize as string by default?
Note, I have no problem deserializing these with odin, but I plan to post this to an aspnet core api and I'm not sure yet if that will be able to parse a guid like this. [edit - as a workaround i can just use string in my class and use guid.ToString() when creating it]