4 ms·
Yes my argument is simply that we publish API specs in a machine-readable format to avoid wasting time implementing clients repeatedly. WSDL and WADL had good i
by ttezel 14y ago
Yes my argument is simply that we publish API specs in a machine-readable format to avoid wasting time implementing clients repeatedly. WSDL and WADL had good intentions at heart, but XML is ugly. JSON is nice since it's human-readable and light. Why not publish JSON versions openly for REST APIs, reducing implementation cost for clients?
- ch 14y ago> ... my argument is simply that we publish API specs in a machine-readable format ... > ... XML is ugly. JSON is nice since it's human-readable and light. ???
- elbear 14y agoYes, there are some dots you need to connect between his two statements. I'm assuming that he meant the following: those machine-readable specs also need to be read by humans at some point, just like code, and, since JSON is more readable, he proposes using it instead of XML.
- mtts 14y agoXML is human readable. It was meant to be (this is why it's text instead of some binary format). It's just really, really verbose, which is what this JSON spec is going to end up being once it's dealt with all imaginable edge cases.
- mindcrime 14y agoXML is more human readable than JSON, to my eyes.
- dsego 14y agoReally? Let's write a shopping list on a piece of paper in JSON and XML. Which one would be more similar to the way we write down lists in real life?
- mindcrime 14y agoReally? Let's write a shopping list on a piece of paper in JSON and XML. Which one would be more similar to the way we write down lists in real life? XML: <list> <items> <item>Milk</item> <item>Eggs</item> <item>Bread</item> <item>Butter</item> </items> </list> JSON: { "list": { "items": [ "Milk", "Eggs", "Bread", "Butter" ] } } I don't know that either one is particularly close to the way I'd write down a list in real life, to be honest. This is a pretty trivial sample, and neither is especially hard to read/parse by a human. But the JSON still looks closer to line-noise to me. :-)
- elbear 14y agoThat may be so, but most opinions I hear in discussions about XML vs JSON say that JSON is more readable, probably because it's less redundant and similar to data structures found in some programming languages.
- bpphillips 14y agoThis seems similar in goal to the SPORE project (https://github.com/SPORE https://github.com/SPORE). Have you seen that and/or considered merging efforts?