3 ms·
> Makes me think it's a shame that making a json based protocol is so much… Maybe I'm not the human you are thinking of, being a techie, but I find a well stru
by dspillett 2y ago
> Makes me think it's a shame that making a json based protocol is so much…
Maybe I'm not the human you are thinking of, being a techie, but I find a well structured JSON response, as long as it isn't overly verbose and is presented in open form rather than minified, to be a good compromise of human readable and easy to digest programmatically.
- marcosdumay 2y agoThe legibility is probably one of the main reasons JSON got adopted. XML can be made to not look too bad, but in SOAP it must be unreadable, so everybody was looking into fixing this.
- xmlmann 2y agoXML has a sweet advantage though. It can be styled in the browser. For example a sitemap that works for Google, OpenAI, &c. and is human readable looking like a web page. Example: https://www.wpbeginner.com/sitemap.xml https://www.wpbeginner.com/sitemap.xml
- immibis 2y agoThis is fun, but in reality, not all that useful. Except you can impress other nerds when they "view source" and there's not an HTML tag in sight.
- immibis 2y agoXML is a language designed for markup (i.e. text formatting), and fitting structured documents into it creates an impedance mismatch. Dictionary definitions may be considered as marked-up documents, so it may work. The overall structure of the dictionary is not.
- deleted 2y ago[deleted]
- keepamovin 2y agoYeah, but JSON has the vulnerability that it will tend to become like an overgrown garden over time, because it can. The type of TCP <code> <response> <text> protocols the GP talks about have the benefit of their restrictions and are definitely a better balance (human / machine), and more stable.