Closed
Description
Hi, I'd like to serialize JSON-LD to N-Quads, however I keep getting NQuads serialization only makes sense for context-aware stores!
exception. From the Dataset definition and this issue it seems that it however should work, correct? Here is my code (formatting might be bit off):
from rdflib import Dataset
try:
data = """{
"@context": "http://schema.org/",
"@type": "Person",
"name": "Jane Doe",
"jobTitle": "Professor",
"telephone": "(425) 123-4567",
"url": "http://www.janedoe.com"
}"""
ds = Dataset()
ds = ds.parse(data=data, format="json-ld")
print(ds.serialize(format="nquads"))
except Exception as e:
print(e)