Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not loading jsonld file #53

Open
noorbakerally opened this issue Dec 11, 2017 · 6 comments
Open

not loading jsonld file #53

noorbakerally opened this issue Dec 11, 2017 · 6 comments

Comments

@noorbakerally
Copy link

I have a valid jsonld file at https://data.hikob.com/osc/parking but rdflib is not loading it. My codes are:

>>> from rdflib import Graph, plugin
INFO:rdflib:RDFLib Version: 4.2.1
>>> g = Graph().parse("https://data.hikob.com/osc/parking",format="json-ld")
>>> g.serialize()
'<?xml version="1.0" encoding="UTF-8"?>\n<rdf:RDF\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n>\n</rdf:RDF>\n'
@bjonnh
Copy link

bjonnh commented Dec 13, 2017

@niklasl
Copy link
Member

niklasl commented Jan 2, 2018

This is a consequence of the problem described in #34 (thus dependent on RDFLib/rdflib#436). If you use code like this it should work:

from rdflib import *
g = ConjunctiveGraph()
g.parse("https://data.hikob.com/osc/parking", format="json-ld")
print(g.serialize())

@niklasl
Copy link
Member

niklasl commented Jan 2, 2018

@bjonnh: your data seems to be in RDF/JSON, which is a different format than JSON-LD (and rdflib-jsonld only supports the latter).

@danbri
Copy link

danbri commented Mar 27, 2018

I think I've hit the same issue, with https://raw.githubusercontent.com/iot-schema-collab/iotschema/master/thing.jsonld , which the JSON-LD playground seems happy with. Tried some of the techniques mentioned and linked here, no success yet.

@danbri
Copy link

danbri commented Mar 27, 2018

I found a fix, #40 (comment)

@jerrygaoLondon
Copy link

still does not work with latest version when parsing the format with @context and @graph as the example file mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants