pyld from-rdf¶
Requires pip install PyLD[cli]
Convert raw N-Quads from a local path or - into JSON-LD. Remote RDF input is
not supported.
pyld from-rdf --help
Usage: pyld from-rdf [OPTIONS] {INPUT}
Convert N-Quads to JSON-LD.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────╮
│ * INPUT <str> Local path. Pass - to read from standard input. [required] │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --use-rdf-type --no-use-rdf-type Use rdf:type │
│ instead of @type. │
│ --use-native-types --no-use-native-t… Convert XSD values │
│ to native JSON │
│ types. │
│ --rdf-direction <i18n-datatype|comp How to decode base │
│ ound-literal> direction from RDF. │
│ --help Show this message │
│ and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────╯
Usage: pyld from-rdf [OPTIONS] {INPUT}
Convert N-Quads to JSON-LD.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────╮
│ * INPUT <str> Local path. Pass - to read from standard input. [required] │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --use-rdf-type --no-use-rdf-type Use rdf:type │
│ instead of @type. │
│ --use-native-types --no-use-native-t… Convert XSD values │
│ to native JSON │
│ types. │
│ --rdf-direction <i18n-datatype|comp How to decode base │
│ ound-literal> direction from RDF. │
│ --help Show this message │
│ and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────╯
Example¶
pyld from-rdf docs/examples/data/person.nq[
{
"@id": "http://example.com/ada",
"http://schema.org/name": [
{
"@value": "Ada Lovelace"
}
]
}
]
{
"@id": "http://example.com/ada",
"http://schema.org/name": [
{
"@value": "Ada Lovelace"
}
]
}
]
Source person.nq