w3c / json-ld-api

JSON-LD 1.1 Processing Algorithms and API Specification
https://w3c.github.io/json-ld-api/
Other
77 stars 31 forks source link

Relationship to the RDF/JS Dataset interface(s) #166

Open iherman opened 5 years ago

iherman commented 5 years ago

This may be way too late... however. I wonder whether it is possible to bring the types defined in 9.2 RDF Dataset Interfaces to the interfaces defined in the RDF/JS: Dataset specification 1.0 and RDF/JS: Data model specification, as worked on by the RDF JavaScript Libraries Community Group. After all our interfaces are very close to the CG's interfaces, although the latter might be a bit convoluted (in RDF/JS a Quad consists of three Term-s, as opposed to strings, Term has its own interface).

This may lead to a backward compatibility issue (I do not know) and may force to change the implementations a bit. But getting closer to a Javascript community is useful.

@rubensworks, I believe you are active in that CG (or at least your colleagues are), any feeling about this?

Again, it may be too late, but acknowledging this relationship in the document, hinting at a possible alignment in future versions may be useful.

rubensworks commented 5 years ago

Unfortunately the JSON-LD API Dataset and RDFJS Dataset interfaces are quite different for two reasons:

  1. JSON-LD API Dataset separates graphs by graph name, while RDFJS Dataset places everything in one datastructure as quads.
  2. The triple/quad are indeed quite different. RDFJS chose for Term datastructures, while JSON-LD API uses raw strings. Additionally, RDFJS incorporates graph names at this level, while JSON-LD API only considers triples at this level.

While it may be useful to align with RDFJS in JavaScript implementations, it may not be necessary for other languages to adopt these datastructures as well.

However, I think it is at least possible to implement both the JSON-LD API and RDFJS interfaces at triple/quad level in JavaScript implementations, as this is already mostly achieved by the current jsonld.js implementation.

So yes, I agree that it's useful to acknowledge the link in the document, and suggest alignment with both interfaces (assuming JS implementations), but I'm not sure about forcing it at this stage.

iherman commented 5 years ago

This issue was discussed in a meeting.