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

@graph not parsed correctly #66

Open
samuraraujo opened this issue Aug 27, 2019 · 1 comment
Open

@graph not parsed correctly #66

samuraraujo opened this issue Aug 27, 2019 · 1 comment

Comments

@samuraraujo
Copy link

RDFLib output a empty graph after parsing this file. is this a known bug ?
{
"@context": {
"@vocab": "http://xmlns.com/foaf/0.1/",
"knows": {"@type": "@id"}
},
"@graph": [{
"name": "Manu Sporny",
"@type": "Person",
"knows": "https://greggkellogg.net/foaf#me"
}, {
"@id": "https://greggkellogg.net/foaf#me",
"@type": "Person",
"name": "Gregg Kellogg"
}]
}

@ibtisaam-butt-nbs
Copy link

I am facing the same issue. I am able to do it, using the inline schema without the key word "@context". However, rdflib returns an empty list or just the schema reference when used with graph.
For example:
[
{
"@id": ":b131978533",
"@type": [
"http://schema.org/Organization"
],
"https://schema.org/subject_duns": [
{
"@value": "131978533"
}
],
"https://schema.org/country_code": [
{
"@value": 1073
}
],
"https://schema.org/business_name": [
{
"@value": "KMART HOLDING CORPORATION"
}
],
"https://schema.org/owner_duns": [
{
"@value": "191222244"
}
],
"https://schema.org/owner_association_type": [
{
"@value": "Parent"
}
],
"https://schema.org/Subsidiary": [
{
"@id": "
:b191222244"
}
]
}
]

returns the correct rdfxml.

But this:
{
"@context": {
"SUBJECT_DUNS": {
"@id": "https://schema.org/subject_duns",
"type": "duns"
},
"COUNTRY_CODE": {
"@id": "https://schema.org/country_code",
"type": "integer"
}
},
"@graph":[
{
"@id": "_:b131978533",
"@type": [
"http://schema.org/Organization"
],
"SUBJECT_DUNS": [
{
"@value": "131978533"
}
],
"COUNTRY_CODE": [
{
"@value": 1073
}
]
}
]
}

returns an empty list.

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

2 participants