JSON-LD context for genre #1473

Open
tfrancart opened this Issue Jan 10, 2017 · 2 comments

Projects

None yet

2 participants

@tfrancart

The definition for http://schema.org/genre says the value can be either Text or URL.
But in the SDO JSON-LD context (curl -L --header "Accept: application/ld+json" http://schema.org) I find :

"genre": { "@id": "schema:genre", "@type": "@id"},

Which forces the value of genre to be parsed like a URI. Thus JSON like

{
  "genre": "règlement"
}

cannot be parsed properly.
Probably the JSON-LD context should not contain "@type": "@id" ?

@akuckartz

Nor "either": URLs are text for schema.org.

@tfrancart

OK, but http://schema.org/genre says "Values expected to be one of these types : Text URL". I read it as "the value can be either a piece of text or a URL".
Other properties are referring to the URL datatype only, e.g. "relatedLink", and in this case the JSON-LD context can specify "@type": "@id", but for those like "genre" or "schemaVersion" or "softwareRequirements", etc. that define "Text or URL" as possible values, I don't think it is correct to force the JSON to have a URI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment