digitalbazaar/pyld

Compact a framed JSON-LD document?

stefanbischof opened this issue · 1 comments

Hi,

is it possible to compact a framed JSON-LD document?

I'd like to convert a JSON-LD document to a nice, framed JSON document (with the context in the HTTP header). Having the complete IRIs again in the framed output kinda defeats the purpose.

Compacting via compact() works fine, also framing via the frame() function works. But when I first compact the JSON-LD document and frame it, it is again expanded. I found no option to prevent frame() to expand the document again. Is this possible with pyLD?

Found the solution: adding the context to the frame does exactly what I wanted.