4 ms·
> That said, JSON has corner cases too, similar to XML or worse. Feel free to list some.
by stormbrew 5y ago
> That said, JSON has corner cases too, similar to XML or worse.
Feel free to list some.
- zvrba 5y agohttps://bishopfox.com/blog/json-interoperability-vulnerabilities https://bishopfox.com/blog/json-interoperability-vulnerabili...
- deleted 5y ago[deleted]
- stormbrew 5y agoMost of these just amount to "some parsers are bad", which.. I mean sure? But xml's surface area for parsers to be 'bad' is so much greater, and its gotchas are thus much more subtle. I hope you're not trying to suggest that all xml parsers are identical and perfect. Your assertion was that json's edge cases are "as bad or a little worse" but imo this document doesn't suggest that at all. Every single thing listed in it can go more wrong with xml, not less.
- GoblinSlayer 5y agoThe often mentioned design paralysis of choice between elements and attributes - in JSON there can be many ways to implement a collection of name/value pairs. One interesting case is compound key: you can use a mini serialization format and still make it an object (actually saw this in the wild).
- wusspuss 5y ago> in JSON there can be many ways to implement a collection of name/value pairs. Are there? JSON has dicts and lists. I mean you could store a collection of name value pairs in a list, maybe even a list of lists, but that's just stupid and an incorrect usage of the format. Where as in xml there really are tons of ways to do that, and ALL of them are awkward