3 ms·
Every time I get to work with JSON-LD (and json-schema and so on) I keep asking myself: how is this better than XML? (I am convinced it isn't).
by berkes 4y ago
Every time I get to work with JSON-LD (and json-schema and so on) I keep asking myself: how is this better than XML? (I am convinced it isn't).
- lcrz 4y agojson-schema has nothing to do with JSON-LD. If you want shape constraints on your JSON-LD data, you'll need SHACL: https://www.w3.org/TR/shacl/ https://www.w3.org/TR/shacl/ JSON itself has a much simpler specification than XML, and feels much more lightweight for a lot of devs. Under the hood though, linked data is all RDF.
- HelloNurse 4y ago"Over the hood" JSON is less complicated but less correct than XML, not a good positioning for long-term data storage.
- seabass-labrax 4y agoAre you claiming that A: plain (non-LD) JSON is less correct than plain XML, or that B: JSON-LD is less correct than RDF/XML?
- berkes 4y agoI wasn't implying they are related in that way. Just that both make me think "this thing has long been solved in XML, why re-invent it in JSON?"
- matja 4y agoI was just thinking this looks similar to a DDI (Data Documentation Initiative) citation element, but the advantage of the DDI XML schema is that one can annotate any existing element in an XML document by importing the DDI namespace, which shouldn't change how the document is otherwise interpreted by applications, but this JSON schema as far as I can tell is a stand-alone document?
- zerocrates 4y agoJSON-LD is definitely designed, at least partially, to do the "annotate a preexisting document" thing. You can add the "context" and have it specify the RDF semantics that should apply to each preexisting key.