Just try to write the JSON equivalent of:
The JSON format was invented by Douglas Crockford.
If your document consists mainly in losely structured text with some annotation, you better use XML.41–50 of 274 posts
Just try to write the JSON equivalent of:
The JSON format was invented by Douglas Crockford.
If your document consists mainly in losely structured text with some annotation, you better use XML.The XML example seemed odd to me as written. In the JSON case, yes there was a prefixed key "$reports", but it told me what the relationship was. Looking at the XML, what does it mean for an Employee to be nested inside another Employee?
XML is so awesome for UI layouts. I had a thesis that I worked on that was basically a subset of HTML (check the SMIL specification for something similar, albeit a bit more complicated, SMIL used to be a W3C recommendation). It was so easy to understand that every person who was able to use a computer would pick it up quickly. This was not the case for HTML, my guess is because there are a ton of HTML tags and that c…
Why not allow authors to define their own names? Like
Then internal functionality can be attached to each element via attributes, like how aria roles work.If XML is better at representing trees, and JSON is a tree, does that mean that XML is better at representing JSON than JSON?
But when you deal with inherently hierarchical data, trees, XML is good.
We need more articles like this, to remember us that we should consider what's best for the task at hand and not what's trendy.
> However, we’ve created another problem in the form of inconsistency: some user properties are represented as element attributes, others as child elements.
Exactly. I’ve seen XML with element attributes and child elements all over the pace. No rhyme or reason for any of it. It’s especially bad in older systems.
I pushed hard at my last job for the SOA team to build REST/JSON web services. Oracle sold them a product to bridge the gap and they got End Of Life announcements 6 months later! Glad I’m gone.
I guess XML might be perfect for when you can't decide between singular and plural and want to leave the problem to others...
Because that's the biggest problem besides charset encoding that JSON helps solving: in JSON, you can be unmistakably clear that a given property is to be interpreted as a list of values, even when the current number is less than two. In XML you can just vaguely communicate that intent with an intermediary "plural element" unless you go full schema.
isn't half as clear as {"bs":[{}]}
(attributes unrelated to this difference omitted)XML is so awesome for UI layouts. I had a thesis that I worked on that was basically a subset of HTML (check the SMIL specification for something similar, albeit a bit more complicated, SMIL used to be a W3C recommendation). It was so easy to understand that every person who was able to use a computer would pick it up quickly. This was not the case for HTML, my guess is because there are a ton of HTML tags and that c…
As someone who has only used html (as in, no other xml-based UI), I'm really curious why it's necessary to even define the tags at all. Why not allow authors to define their own names? Like Then internal functionality can be attached to each element via attributes, like how aria roles work.
I have yet to read anything that convinces me that XML is good for anything . Just because XML in certain cases is less bad than some other cherry-picked technology, doesn't mean that there aren't other better options. See also Erik Naggum's legendary rant: https://www.schnada.de/grapt/eriknaggum-xmlrant.html
I have yet to read anything that convinces me that XML is good for anything. Just because XML in certain cases is less bad than some other cherry-picked technology, doesn't mean that there aren't other better options.See also Erik Naggum's legendary rant: https://www.schnada.de/grapt/eriknaggum-xmlrant.html
What would be the JSON/YAML/TOML equivalent?