w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

feature request: mapping on simple paths #419

Open bertvannuffelen opened 1 year ago

bertvannuffelen commented 1 year ago

Is there a possibility to add a path to a property mapping?

In my target RDF structure I have

ex:123 <https://dvl.be/ns/model#prop1> _:b0 .
_:b0 <https://dvl.be/ns/model#prop2> "AAAB" .

which would correspond to a json structure (one-to-one) as follows

 "prop1" : {
   "prop2" : "AAAB"
 },

But now I have the challenge that I would like to create a json structure:

"prop3" : "AAAB"

where thus the nesting in RDF is lifted.

It would be nice if I could map prop3 as follows in a path:

"prop3" : {
     "@id" : "<https://dvl.be/ns/model#prop1>/<https://dvl.be/ns/model#prop2>"
    }