3 ms·
JSON is popular because there is a straightforward mapping from JSON to native types in many programming languages.
by frognibble 17y ago
JSON is popular because there is a straightforward mapping from JSON to native types in many programming languages.
- stcredzero 17y agoLanguage designers take note: there is tremendous utility in making entities in your language isomorphic to entities expressed in previous languages. I am actually using such isomorphisms in my current porting project. I'm literally getting a couple of orders of magnitude more productivity out of this over porting by hand. Also note: less syntax makes this easier.
- sketerpot 17y agoI recently wrote a program to do Threefish encryption which I deliberately wrote to look as much like the mathematical notation in the spec as possible. That made things so much easier that it was almost ridiculous, even if it made the resulting program very peculiar-looking.
- blasdel 17y agoYou'll love what Alan Kay has been working on: http://vpri.org/pdf/tr2007008_steps.pdf http://vpri.org/pdf/tr2007008_steps.pdf You'll be especially enamored of their 200-line TCP/IP implementation, introduced on p17 and reproduced with documentation starting on p44. It's implemented as a grammar in their meta-language that parses the ASCII-art diagrams in the RFCs and executes them.
- deleted 17y ago[deleted]
- andreyf 17y agoMore fundamentally, JSON embodies some fundamental metaphors we use in data types - numbers, strings, lists, and maps. Those are a lot more intuitive/familiar than whatever metaphors XML comes up with.