logoalt Hacker News

brunoborges • yesterday at 9:45 PM • 7 replies • view on HN

> "JavaScript Object Notation (JSON) is a simple data interchange format [...]"

Clearly it isn't, otherwise every language would have sorted it out by... a long time ago.


Replies

yubblegum • yesterday at 11:59 PM

Meet the "Simple Object Access Protocol": https://www.w3.org/TR/2000/NOTE-SOAP-20000508/

thiht • today at 12:04 PM

It IS a simple format. And you can make a parser yourself very easily. Doesn’t mean that it will be the fastest or most memory efficient. Don’t confuse format and implementation

kccqzy • yesterday at 10:51 PM

Some languages have a culture of doing things correctly and conforming strictly to the spec. These languages have indeed sorted it out years ago. Haskell for example. Any language that doesn’t have a special number type for JSON is a half-assed implementation, because 1e1000 is a perfectly valid JSON number that is beyond the typical IEEE754 double precision floating point numbers; does your language handle that correctly? Haskell does. This is but a small example of a strong culture bias towards correctness.

➕ show 3 replies
DrBazza • today at 9:04 AM

My company uses JSUN (/sarcasm) where O = object, and U = union.

Who knew the same object could have completely different definitions based on some flags?

ivanjermakov • today at 12:05 AM

Simple data format does not imply that API to work with it is easy to get right.

DanielHB • today at 10:31 AM

I mean, it is better than the disaster that is CSV...

jayd16 • yesterday at 10:23 PM

Ok so nothing is simple then?