3 ms·
JSON is how some data is passed today. It's certainly not the best way and might go out of style just like XML did a while ago.
by adrianN 8y ago
JSON is how some data is passed today. It's certainly not the best way and might go out of style just like XML did a while ago.
- gwillz 8y agoI was reading something on HN recently and I ended up on this wiki article. https://en.wikipedia.org/wiki/Billion_laughs_attack https://en.wikipedia.org/wiki/Billion_laughs_attack It got me thinking about it. JSON is annoyingly simple at times, yes. But that also protects it from some pretty gnarly stuff seen in XML and YAML. I suspect it's a considerable contributor as to why it's the choice transport format. I wouldn't toss it in with XML just yet.
- pjmlp 8y agoIt is already on its way out, thanks to gRPC and need for performance instead of parsing text all the time. It is only a matter of browsers getting native support for gRPC.
- sonnyblarney 8y agoIt's available now! Yay! [1] With gPRC there's still a lot of binding code, and you need to map all of that in Java, but you do get some validation etc. out of it. It does make the 'data transfer' comparison a little less harsh. [1] https://github.com/grpc/grpc-web https://github.com/grpc/grpc-web
- pjmlp 8y agoNot really, I meant as browser builtin API, implemented in native code.
- sonnyblarney 8y agoNo, that's not on the roadmap and I doubt it ever will be. It's a very specific technology, and as long as it can be implemented fairly efficiently 'up the stack' in JS, then it mostly belongs there. Aside from HTTP2 (which is a roadblock now, but not soon) it'll be fine in JS.