问题
I would like to get a JSON-LD representation of Schema.org in the same way I can have an RDF version in http://topbraid.org/schema/.
I see the main page of Schema.org is represented with JSON-LD, but there are not type definitions as there are in the RDF version.
For a second question, how can a JSON-LD parser understand the properties of a Schema.org's Person type if it cannot access to such information in JSON-LD?
回答1:
The canonical representation of Schema.org is in HTML+RDFa.
RDFa is, like JSON-LD, a RDF serialization. It should be easy to convert from RDFa to JSON-LD with your favorite RDF tool, if needed.
Under https://schema.org/docs/tree.jsonld a JSON-LD file can be downloaded which seems to describe all types (but no properties). (Corresponding issue: Add a JSON(-LD) view of the entire type hierarchy.)
Under http://schema.org/docs/jsonldcontext.json the JSON-LD context file can be downloaded which seems to contain all types and properties. But it doesn’t state which included domain/range the properties have.
The issue Add more export formats (e.g. as offered but obsolete at schema.rdfs.org) tracks ideas/plans to provide other formats than RDFa.
来源:https://stackoverflow.com/questions/36236618/get-json-ld-information-from-schema-org