lanthaler / JsonLD

JSON-LD processor for PHP
MIT License
335 stars 62 forks source link

Add utility functions to treat JSON as JSON-LD #80

Closed frmichel closed 6 years ago

frmichel commented 6 years ago

Hi Markus,

Here is a proposition for to extension functions: expandJsonAsJson and compactJsonAsJsonLD. Both apply a JSON-LD profile to a regular JSON file. One thing still lacks I would say: interpret JSON as JSON-LD using the Link http header as described in the specifcation

Also added a utility function to convert a previously expanded document to RDF quads.

Cheers, Franck.

lanthaler commented 6 years ago

Hi Franck,

This is already supported. Just pass the expandContext option to the existing expand and compact operations. The Link header is supported out of the box as well.

Cheers, Markus

frmichel commented 6 years ago

Indeed, I had not noticed. Sorry about that. Cheers.