Hacker News new | past | comments | ask | show | jobs | submit login

JSON is slow, not particularly comfortable for humans to work with, uses dangerous casts by default, is especially dangerous when it crosses library or language boundaries, has the exponential escaping problem when people try to embed submessages, relies on each client to appropriately validate every field, doesn't have any good solution for binary data, is prone to stack overflow when handling nested structures, etc.

If the author says they dislike JSON, especially given the tone of this article with respect to nonsensical protocols, I highly doubt they approve of SOAP.




> JSON is [...]

What would you suggest instead given all these cons?


Fixing all of those at once might be a bit too much to ask, but I have some quick suggestions. I'd say for a more robust JSON you could try Dhall. If you just want to exchange lumps of data between programs I'd use Protobuf. If you want simple and freeform I'd go with good old sexps.

https://github.com/dhall-lang/dhall-lang

https://protobuf.dev/

https://en.wikipedia.org/wiki/S-expression


Suggesting protobuf as alternative to JSON is crazy talk.


And this is why I was asking the question in the first place.

Not that I'm a fan of JSON, but I fail to conceive anything better as a general purpose protocol.


You must not have seen the abject misuses of JSON I've seen then




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: