Re:How to Avoid Being Called a Bozo When Producing XML (2005)
by zyxley on Sunday July 31, 2016 @06:50PM
(#12199292)
You could do make it more like S-expressions in JS if you really wanted.
Not quite the same, but nothing keeps you from parsing an array of key/value pairs instead of a hash.
[ Parent
| on HN ]
Re:How to Avoid Being Called a Bozo When Producing XML (2005)
by wtbob on Sunday July 31, 2016 @09:07PM
(#12199684)
You may not leave JSON object properties unquoted, so it'd have to read:
{"object": [
{"id": "1234"},
{"isEnabled": "true"},
{"props": ["abc", "123", "false"]}]}
So you have extraneous quotes, extraneous semicolons, extraneous commas, plus the parsing code is complicated by having to handle all of that rather than atoms & lists (that's not a strong reason, since parsing code is written once and used millions of times).I really, really don't get the visceral opposition to S-expressions. From my perspective they're both better & simpler.