3 ms·
Having seen all three examples, I am now convinced that JSON was the correct choice. Thank you for posting all three examples, it's much appreciated. I hadn't s
by floatingatoll 7y ago
Having seen all three examples, I am now convinced that JSON was the correct choice. Thank you for posting all three examples, it's much appreciated. I hadn't seen s-expressions before and I was considering them a plausible alternative, but now that I've seen it, I don't believe that prefix-operator functions in Lisp-compatible syntax are the appropriate way to construct and transmit data from APIs.
- eadmund 7y ago> I don't believe that prefix-operator functions in Lisp-compatible syntax are the appropriate way to construct and transmit data from APIs. Why not? I'm honestly curious, because I cannot comprehend preferring that mess of JSON to the s-expressions. The JSON just looks like a dog's breakfast, while the s-expressions look clean & easy to write, read, parse and use. Also, I don't think they are functions: they're just lists with a convention. Those lists can be used to expression function calls, as in Lisp, but in a data format I think that the lists more often express structure. One thing I love about s-expressions is that one indicates the type as the first item in the list, e.g.: (foo …) whereas with JSON one has to invent pseudo-properties: { "@type": "foo" } (yikes, that verbosity is ugly)