Open satra opened 8 years ago
It's actually very simple to provide it yourself using the namespaces() function on Graph:
import rdflib
g = rdflib.Graph()
g.load('http://www.w3.org/People/Berners-Lee/card.rdf')
# set the context to a dictionary construction from g.namespaces():
print g.serialize(format='json-ld', context=dict(g.namespaces()))
I'm not arguing for or against making this default behavior (it already is in other namespaced formats), but it is very simple to do on your own.
Issue #95 has been closed because this one (#43) was running, and this one is closed because the #95 references it.......... and the context still has to be put manually... sad.
@Swannbm Wrong, this issue is still open.
.....oh.... Forgive me please, I thought it was closed by cmaumet in 2016. Still new on Github.
returns
and
it would be nice if the default prefixes could automatically be used for generating the context internally.