Closed koliyo closed 7 years ago
So what would you use this for?
Also undefined
is a JavaScript only thing. How would you deserialize this with Python, Java, C#, etc.?
I was using it in combination with deep-object-diff, where missing members are marked as undefined. When these were removed from the output I missed some information in my object diffs. But I have a workaround for this now.
It is kind of a special case I understand, and not really suited for cross-environment communication.
I got here after being surprised with 'undefined' in the output after deleting a property. My use-case is updating a config file. i.e. read config -> update config -> write config. After updating the config to delete a property, it still shows up in the written output which I don't expect. I would expect this to behave like regular json.
Not sure why this issue isn't suited for cross-environment communication ?
It would be useful to have the option of not including undefined members in the serilaized string. Eg
vs