digitalbazaar / pyld

JSON-LD processor written in Python
https://json-ld.org/
Other
606 stars 131 forks source link

Clarify support for interpreting-json-as-json-ld #166

Open rob-metalinkage opened 2 years ago

rob-metalinkage commented 2 years ago

The JSON-LD specification allows injecting a context into a json document before parsing..

https://w3c.github.io/json-ld-syntax/#interpreting-json-as-json-ld

It is not obvious how PyLD supports this mode of processing - when accessing a document that sets the context via a link header it gets passed to process_context() - but it should be possible to force use of a context during parsing json that comes from other sources, and cannot set the link header this way. I suspect this is possibly just a small tweak and/or updating the README with a relevant example.