4 ms·
I don't think that canonical S-expressions and JSON are really on the same level. JSON enforces much stricter structure or constraints - key value pairs with st
by danbruc 11y ago
I don't think that canonical S-expressions and JSON are really on the same level. JSON enforces much stricter structure or constraints - key value pairs with string keys and a small set of possible value types, numbers, strings, booleans, arrays, you name it. You have to build all of this on top of canonical S-expressions, you get two byte sequences, the display hint and the actual value, and then it's your task to interpret the raw byte sequences. It's also your task to figure out whether a list of pairs represents a map or a list of items with two values. It's definitely a powerful format but in order to be able to use it, you have to first build a lot of additional functionality on top of it. And by the way, this is not a mindless defense of JSON, I prefer to stay away from all things JavaScript as far as I can.