4 ms·
JSON's popularity is largely due to it's ability to easily convert to native data structures regardless of what language you happen to be using. In fact, it's l
by maratd 15y ago
JSON's popularity is largely due to it's ability to easily convert to native data structures regardless of what language you happen to be using. In fact, it's less of a data encapsulation format (like XML) and more of a serialization format.
If you need to markup your data, use a markup language like XML or S-Expressions. If you need to serialize data, JSON is an excellent choice.
- anon_d 15y agonative data structures regardless of what language you happen to be using C, asm, ML, Lisp, Java, Tcl?
- lmm 15y agoDid you have a point? Yes, JSON really is the best format for serializing data from any of those; for Tcl/Lisp/ML you might get lazy and use the native object format, but doing so will bite you sooner or later. For C/asm you might prefer ASN.1 but in my experience human-readability is worth the effort, and you can and should use a library rather than your own code for serialization. For Java it really is crystal clear; how else would you do it?
- bunderbunder 15y agoThe last two letters of each acronym really do say a lot: Javascript Object Notation eXtended Markup Language