jsonld.from_rdf()¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_
|
a serialized string of RDF in a format specified by the format option or an RDF dataset to convert. |
required | |
options
|
FromRdfOptions | None
|
optional processing options; see Options below. |
None
|
Returns:
| Type | Description |
|---|---|
|
the JSON-LD output. |
Options¶
format
instance-attribute
¶
The format if input is a string: application/n-quads for N-Quads (default: application/n-quads).
rdfDirection
instance-attribute
¶
Either i18n-datatype or compound-literal is supported (default: None).
useNativeTypes
instance-attribute
¶
True to convert XSD types into native types (boolean, integer, double), False not to (default: True).
useRdfType
instance-attribute
¶
True to use rdf:type, False to use @type (default: False).
Example¶
Example from_rdf.py