Get JSON-LD information from Schema.org

情到浓时终转凉″ 提交于 2019-12-11 10:19:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!