2 ms·
At least with XML, you can have custom datatypes, not just strings and numbers and booleans. In all seriousness, everything in JSON can be expressed as XML; bu
by withinboredom 2y ago
At least with XML, you can have custom datatypes, not just strings and numbers and booleans.
In all seriousness, everything in JSON can be expressed as XML; but not necessarily the other way around.
- iforgot22 2y agoOther way around works too (I gave an example above), it's just not pretty in either direction. XML makes sense for open-ended, human-written things like documents or apps. It doesn't work so well for APIs and other machine-read/written things where you'd normally use JSON.
- j45 2y agoSo incredibly true. And that one time you see what XML can do that little else can. Like that time there were hundreds of forms to build, refused, held a silent protest until a reasonable way presented itself. Enter "XML Form Template" or "XML Form Definition.", A form is generated from the XML in html, filled in, and on submit, the XML is filled back in. Built one form renderer and done. Never got old watching it. XForms (W3C standard) https://www.w3.org/TR/2003/REC-xforms-20031014/slice2.html https://www.w3.org/TR/2003/REC-xforms-20031014/slice2.html