4 ms·
> You gotta remember that JSON doesn’t support all of the types that many languages do. So you need to engineer around that by annotating your attributes with a
by forrestthewoods 6y ago
> You gotta remember that JSON doesn’t support all of the types that many languages do. So you need to engineer around that by annotating your attributes with a type or relying on a naming convention on keys. You can’t get mad at JSON for not being good at this.
Oh I absolutely can get mad at it. JSON was not designed to be good at this. That’s the problem! Well, that and for various reasons (some good, some bad) programmers decided to use JSON for _everything_.
JSON sucks. If it didn’t exist the world would probably invent and standardize on something better. But it does exist, and it sucks, and we’re stuck with it.
- deleted 6y ago[deleted]
- whalesalad 6y agoI guess you haven’t spent a lot of time time with XML? JSON is not perfect but I wouldn’t say it sucks.
- forrestthewoods 6y agoXML is a dumpster fire. JSON merely sucks.
- deleted 6y ago[deleted]
- jitl 6y agoJSON replaced the previous iteration XML which also had a million ways to do things, plus rarely-used schemas, and miles of abstractions between your object and the text XML representation. The standard libraries for working with XML also had extremely insecure defaults around entities that were tantamount to remote code execution. Overall JSON simplified serialization tasks for the 80% case. The remaining 20% of special situations leads to the pain and suffering, especially in static typed languages.