I have huge respect for Doug Crockford, and I never imagined I would disagree with him. However I think by now we've seen that a lot of that "unnecessary" XML complexity was not, in fact, entirely unnecessary. These days we use JSON for everything, but now we've got JSON Schema, Swagger/OpenAPI, Zod, etc etc. It's not really simpler and there's a lot of manual work - we might as well be using XML, XSD & SOAP/WSDL.
JSON is great, but I surely wish it supported comments. That's the nature of its failings: too minimal.
JSON vs. XML
71–80 of 252 posts
Re: JSON vs. XML
#72Earlier quoted context omitted.
I remember a meeting where a consultant from an MCP excitedly told our mutual client that the XP in the upcoming version of Windows stood for 'XML Protocol.' More innocent times.
Scala had XML literals as part of the language! Apparently Philip Wadler was the person who told them needed it, because the future was XML. ( Walder is big Haskell/PL person)
Re: JSON vs. XML
#73The current state of JSON generation/validation is simpler than the XML ecosystem, but a bit hackish.
We can have a much better stack.
Re: JSON vs. XML
#74Earlier quoted context omitted.
JSON is great, but I surely wish it supported comments. That's the nature of its failings: too minimal.
Comments are simple to parse, but preserving them on the dump is complex. I guess they were sacrificed for the simplicity.
But you still should have the option to at least ignore them while reading. That would make JSON config files so much better to work with.
Re: JSON vs. XML
#75Earlier quoted context omitted.
JSON is great, but I surely wish it supported comments. That's the nature of its failings: too minimal.
This always bothered me. A coworker once suggested using fields ending in 'notes' to put in comments but I never really warmed up to that.
Re: JSON vs. XML
#76Earlier quoted context omitted.
That was the cause of the XML problems - everything was generated. Me? Schemas are a requirement in areas where you need to integrate over different technology / with different implementations. JSON Schema is in those contexts a bit of a kids toy compared to what XML can do.
Adding to the problems of generated schemas, Microsoft and Sun both had different views on how they should be generated. I bought into the promise of "build a wsdl" and you can get clients from .NET and Java. I lost all of that buy in. Hard. I don't know that I can lay the blame on either one of them directly, mind. But the industry definitely suffered from the bad faith cooperation of those companies.
Re: JSON vs. XML
#77I have huge respect for Doug Crockford, and I never imagined I would disagree with him. However I think by now we've seen that a lot of that "unnecessary" XML complexity was not, in fact, entirely unnecessary. These days we use JSON for everything, but now we've got JSON Schema, Swagger/OpenAPI, Zod, etc etc. It's not really simpler and there's a lot of manual work - we might as well be using XML, XSD & SOAP/WSDL.
With XML, the complexity is the baseline, and it only goes up from there. With JSON, the complexity is just an option, the baseline is pretty simple. Also, good XML-tools are rare or expensive.
Re: JSON vs. XML
#78Earlier quoted context omitted.
I remember a meeting where a consultant from an MCP excitedly told our mutual client that the XP in the upcoming version of Windows stood for 'XML Protocol.' More innocent times.
I had a power strip which had "works with windows 95" on the packaging box.
Re: JSON vs. XML
#79Honestly, I would relegate XML to application configuration. Trying to communicate with it with something like HTTP requests/responses is absurd.
When you can get the data as XML, verify via its schema externally and then transform it via XSLT, it's not. Also, it's way better in transferring/storing big, complex intricate data like 3D objects.
Re: JSON vs. XML
#80I remember one time designing the simplest and most readable data format ever and came up with Dixy [0] after removing all I could and still make it usable I'm leaving it here because it will never be used for anything but at least it may inspire somebody design a better format with simplicity in mind [0] https://github.com/kuyawa/Dixy