4 ms·
> The problem isn't with JSON but how some JSON deserializers work. That makes no observable difference to the end-user of JSON wishing to use it as an interch
by q3k 5y ago
> The problem isn't with JSON but how some JSON deserializers work.
That makes no observable difference to the end-user of JSON wishing to use it as an interchange format. The standard might as well be perfect, but if nearly all of its implementations (yes, extending that into deserialization, not just parsing - because that's how most people use JSON!) are problematic, then the standard is effectively also problematic. This is why I also always include Python's broken implementation in my JSON rant - it's not indicative of the standard(s) being bad, but the ecosystem being bad.
- throw_m239339 5y ago> That makes no observable difference to the end-user of JSON wishing to use it as an interchange format. The standard might as well be perfect, but if nearly all of its implementations (yes, extending that into deserialization, not just parsing - because that's how most people use JSON!) are problematic, then the standard is effectively also problematic. This is why I also always include Python's broken implementation in my JSON rant - it's not indicative of the standard(s) being bad, but the ecosystem being bad. Yes it does makes a difference to the end user. Otherwise why single out JSON? XML or YAML would suffer from the exact same issue. Deserializers are an anti-pattern if they don't follow a strict schema. The problem again isn't the JSON spec, it's some deserializers making assumptions about JSON types. In practice data have specs and schemas so JSON/XML/... payloads should also have schemas.