Live data from Hacker News

Why is JSON so popular? Developers want out of the syntax business

blog.mongolab.com

21–30 of 133 posts

Re: Why is JSON so popular? Developers want out of the syntax business

#22

The baby that has been thrown out with the bathwater here is a schema/data description layer. NOT , I repeat NOT , I repeat NOT for verification but rather for tools, so that people working in strongly typed languages can interact with JSON services in a reasonable manner. Unfortunately the one option I see, JSON Schema, appears to have caught the XML/Java bug, and has gotten very complicated.

That because schemas are complicated, no matter which way you encode the data.

JSON is so nice and easy and simple until it needs all those things that made it into XML to get the job done.

I whole heartedly agree, there is nothing sweeter than giving another vendor our WSDL with schema when they ask how to work with our system. It eliminates huge effort and ambiguity in system interaction.

Re: Why is JSON so popular? Developers want out of the syntax business

#23
The article mentions SAX parsers and then kinda just moves on and talks a bit about loading JSON with eval. I realize there are other ways of doing things and a fair bit between his two data processing points. My experience with JSON is mostly limited to simple APIs.

Is there a way to handle streaming JSON? I guess it'd be doable in a language like JavaScript where you build up the prototype. Others would probably vary substantially. But I can't say I've tried it yet.

Re: Why is JSON so popular? Developers want out of the syntax business

#24

The article mentions SAX parsers and then kinda just moves on and talks a bit about loading JSON with eval. I realize there are other ways of doing things and a fair bit between his two data processing points. My experience with JSON is mostly limited to simple APIs. Is there a way to handle streaming JSON? I guess it'd be doable in a language like JavaScript where you build up the prototype. Others would probably va…

Yes, there is support for stream parsing of JSON. I haven't tried it myself, https://github.com/lloyd/yajl is one example, which has various bindings in other languages.

Re: Why is JSON so popular? Developers want out of the syntax business

#25

Earlier quoted context omitted.

Hard to believe we had the right answer in 1960 yet are still afraid of the parens as an industry.

(we (are (very (afraid)))

More like (afraid (very (are (we))))

or clojurish: (-> we are very afraid)

Re: Why is JSON so popular? Developers want out of the syntax business

#26

The article mentions SAX parsers and then kinda just moves on and talks a bit about loading JSON with eval. I realize there are other ways of doing things and a fair bit between his two data processing points. My experience with JSON is mostly limited to simple APIs. Is there a way to handle streaming JSON? I guess it'd be doable in a language like JavaScript where you build up the prototype. Others would probably va…

Yes, there is support for stream parsing of JSON. I haven't tried it myself, https://github.com/lloyd/yajl is one example, which has various bindings in other languages.

Ahh, silly me. I never realized YAJL handled that. It should be a good place to learn from. The YAJL code base is pretty tight IIRC.

Re: Why is JSON so popular? Developers want out of the syntax business

#27

The baby that has been thrown out with the bathwater here is a schema/data description layer. NOT , I repeat NOT , I repeat NOT for verification but rather for tools, so that people working in strongly typed languages can interact with JSON services in a reasonable manner. Unfortunately the one option I see, JSON Schema, appears to have caught the XML/Java bug, and has gotten very complicated.

JSON-schema, if you really need it

http://tools.ietf.org/html/draft-zyp-json-schema-03

Re: Why is JSON so popular? Developers want out of the syntax business

#29
post #5

just gimme sexps

Hard to believe we had the right answer in 1960 yet are still afraid of the parens as an industry.

To be clear, the parent post is referring to the invention of LISP.

As a side note, for those who don't know, JavaScript shares a number of features with LISP/Scheme. JSON has the trappings of the very LISPy idea of "Data = Code". It doesn't quite live up to it though. Now, if we only had a parenthesized syntax for JavaScript...

Re: Why is JSON so popular? Developers want out of the syntax business

#30

The best way I've encountered to construct XML: first-name John last-name Smith I kid you not. That's what I'm dealing with at work right now. Thank you, enterprise SOAP solutions.

That makes me want to claw my eyes out, set fire to my keyboard and immigrate to China, where I will start a new life as a blind monk.

Most of the worst experiences of my career as a developer involve some enterprise SOAP API or another.

Post reply on HN