JsonLD provides a static interface for standard JSON-LD operations as defined by the JSON-LD API specification. You can expand, compact, frame, flatten, and convert documents to RDF quads.
// Official JSON-LD API
$expanded = JsonLD::expand('document.jsonld');
$compacted = JsonLD::compact('document.jsonld', 'context.jsonld');
$framed = JsonLD::frame('document.jsonld', 'frame.jsonld');
$flattened = JsonLD::flatten('document.jsonld');
$quads = JsonLD::toRdf('document.jsonld');
// Output the expanded document (pretty print)
print JsonLD::toString($expanded, true);