json-ld-api
json-ld-api copied to clipboard
How can compaction algorithms be used to transform a JSON-LD document with unknown `@profile` value(s) to a JSON-LD document with only known `@profile` value(s)?
Challenge arose in VCDM and Data Integrity —
https://github.com/w3c/vc-data-model/blob/59ed20b1886d34976fa9e729c0b70556cd298e39/index.html#L4375-L4378
Applications MAY
use JSON-LD <a data-cite="JSON-LD11-API#compaction-algorithms">compaction
algorithms</a> to transform a document that uses an unknown JSON-LD context
to one that does not, so the new document's terms will match expectations.
I could not find instructions for the above described transformation. I think that such guidance should allow the application developer to make the described transformation without becoming a JSON-LD expert.
I think that the application developer must —
- expand the JSON-LD that has unknown JSON-LD context(s)
- remove the declaration of the unknown JSON-LD context(s)
- (maybe?) add declaration of known JSON-LD context(s)
- compact the JSON-LD
Seems best to me, to add such documentation to JSON-LD docs, which can then be cited by VCDM, Data Integrity, and others.
(attn: @msporny, @dlongley)