jsonld.to_rdf()¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_
|
the JSON-LD input. |
required | |
options
|
ToRdfOptions | None
|
optional processing options; see Options below. |
None
|
Returns:
| Type | Description |
|---|---|
|
the resulting RDF dataset (or a serialization of it). |
Options¶
documentLoader
instance-attribute
¶
The document loader (default: the global default document loader).
extractAllScripts
instance-attribute
¶
True to extract all JSON-LD script elements from HTML, False to extract just the first (default: True).
format
instance-attribute
¶
The format to use to output a string: application/n-quads for N-Quads.
processingMode
instance-attribute
¶
Either json-ld-1.0 or json-ld-1.1 (default: json-ld-1.1).
produceGeneralizedRdf
instance-attribute
¶
True to output generalized RDF, False to produce only standard RDF (default: False).
rdfDirection
instance-attribute
¶
Only i18n-datatype supported.
Example¶
Example to_rdf.py