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

JSON-LD parser does not like @context consisting in only a URI #41

Open
kaefer3000 opened this issue Jul 28, 2015 · 1 comment
Open

Comments

@kaefer3000
Copy link

Hi,

I tried to parse the default Person example from http://json-ld.org/playground/index.html

{
  "@context": "http://schema.org/",
  "@type": "Person",
  "name": "Jane Doe",
  "jobTitle": "Professor",
  "telephone": "(425) 123-4567",
  "url": "http://www.janedoe.com"
}

but I only get one triple, whose URIs have been resolved wrongly (against the base URI I submitted):

_:n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Person> .

I get similar behaviour for the JSON-LD test cases, by changing @context such that it is only a URI, and not a JSON object, so I guess the @context parsing is to blame.

Cheers!

@aharth
Copy link

aharth commented Sep 4, 2015

The following works though:

{
  "@context": {
    "@vocab": "http://schema.org/"
  },
  "@type": "Person",
  "name": "Jane Doe",
  "jobTitle": "Professor",
  "telephone": "(425) 123-4567",
  "url": "http://www.janedoe.com"
}

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