Skip to main content

expand_for_rdf

Function expand_for_rdf 

Source
pub fn expand_for_rdf(
    registry: &Registry,
    document: &Value,
    limits: Limits,
) -> Result<Value, Error>
Expand description

Expand document the way RDF needs it, refusing a context ojak does not ship.

The result differs from crate::expand in two places, both where ojak’s reading expansion drops what says nothing to a tree reader but is a statement in RDF: a node object with no properties is kept (it is a blank node something points at), and a term whose @container is @graph wraps its values in a graph object.