Closed jmatsushita closed 6 years ago
This looks similar to the @id
maps feature that was added recently (see Node Identifier Indexing. But, that hasn't been extended to graphs quite yet. There is a separate issue on an @graph
container #195. You might look at these in the current spec drafts to see how they might handle your use case.
Some JSON-LD processors already allow you to access data in such a way. Niklas also wrote down the Connect draft a while ago
Framing also has @embed: @link
for in-memory use, although I'm not sure it belongs as part of the core framing algorithm.
Hi there,
I was looking for a way to access properties in a JSON-LD document based on triples (to patch the document). This would mean having a view which creates a dictionary for a given document. The term Normalisation is already used, but this approach would be close to the way https://github.com/paularmstrong/normalizr. D3 uses https://github.com/d3/d3-hierarchy/blob/master/README.md#stratify in a slightly different way but with the same general intent.
The goal would be to be able to address document values with this syntax
stratified_doc[triple.subject][triple.predicate]
or even betterstratified[triple.graph][triple.subject][triple.predicate]
.This could also be a
@stratified
parameter forexpansion
.Example
For a document:
Such a
stratified
would therefore look like:This would therefore allow to do the following: