RDFLib / rdflib-jsonld

JSON-LD parser and serializer plugins for RDFLib
Other
280 stars 71 forks source link

Hierarchical JSON and @reverse #83

Open MonkeyChap opened 4 years ago

MonkeyChap commented 4 years ago

Hi,

I've just been trying out your serializer, and it's really useful. I just wondered, given that the purpose of JSON-LD was to provide a more web-developer-friendly form of JSON, if it's possible to configure the serializer to embed nodes in a tree rather than having each node as a root object ? That would make it much easier and more familiar for web developers to use - i.e. they don't have to go searching for the related node.

Also, in JSON-LD 1.1 there is the @reverse directive (again, aimed at making it easier to construct a tree). I can add the directive to the @context, but it doesn't seem to make any difference. Is there a plan to support this ?

Thanks

Ian