What was the purpose of XML again?
-
What was the purpose of XML again?
-
What was the purpose of XML again?
@Erpel to be the worse JSON alternative -
@Erpel to be the worse JSON alternative
-
@kaia@brotka.st @volpeon@icy.wyvern.rip didn't you write a JSON-LD thingy??
-
What was the purpose of XML again?
@Erpel@hai.z0ne.social paging @alilly@solarpunk.moe for an explanation
-
@kaia@brotka.st @volpeon@icy.wyvern.rip didn't you write a JSON-LD thingy??
-
-
@kaia @Erpel It's for Linked Data, i.e. a well-structured semantic way to describe data. The advantage of this is that you can avoid ambiguity and make sure everyone is on the same page on how to interpret what the data says.
For instance, in traditional JSON you might have a field for "gender". Does it only accept male/female/other, or are other ones included? Each application might handle it differently.
If the field is "myschema.org/gender%22, that URL leads to a schema to describe which values are allowed, maybe a textual description, and so we can be reasonably sure that this field will always be interpreted correctly.
Since using these URLs everywhere would make the JSON really unwieldy, there are some shortcuts to make them shorter: namespaces. Both XML and JSON-LD have them. But JSON-LD has additional things for namespaces that make it an absolute nightmare to handle.