Add a JSON(-LD) view of the entire type hierarchy #318

Closed
danbri opened this Issue Feb 4, 2015 · 8 comments
@danbri

It is too hard for mainstream developers to consume our schema definitions. This is holding back tool development and is easily enough fixed. a JSON view of the hiearrchy would go a long way towards fixing this (but see also meta bug, re CSV and other formats for other audiences, #208 ).

Proposal: a single doc with brief description of all types, JSON-LD in a form that counts as W3C RDFS and also fits default D3.js hieararchy visualizations.

@danbri danbri self-assigned this Feb 4, 2015
@danbri danbri added this to the 2015 Q1 milestone Feb 4, 2015
@danbri

@gkellogg, Sandro Hawke and I discussed this some time back at a SF semweb hackathon, and Gregg has long had a Ruby implementation (@url) that generates such JSON. I've made a cut at similar within the schema.org Python codebase. It's not pretty but does the basic job.

Notes:

  • We have a couple of cases where a schema.org type is defined as having multiple supertypes. Any LocalBusiness will be both an Organization and also Place. Any MedicalEnumeration will be an Enumeration and also a MedicalEntity. This JSON representation over-simplifies this by just reporting a single type and locating each type within one branch of a simple tree. It should at least mention the 2nd supertype.
  • There are no type/property associations in the data.
  • After discussion with @lanthaler and @gkellogg I'm convinced that there is relatively little merit to converge this representation with the JSON-LD contex file. They serve different purposes and audiences.
@danbri

Filing this for gozer since it is pretty much done (with some rough edges), and we need to merge in sdo-scripts anyway.

@danbri

I'm closing this as the code will ship in this next (gozer) release. There are lots of related things that might be worth doing, e.g. examples, improvements but they can get their own bug. Thanks all!

@danbri danbri closed this May 12, 2015
@jaygray0919
@danbri

I've opened #879 for collecting visualization experiments, also blogged at http://blog.schema.org/2015/11/schemaorg-whats-new.html

@jaygray0919
@danbri

Quick thought: don't worry too much about Google Structured Data Testing Tool. It is primarily for mainstream Web publishers who are trying to make their content match the expectation of google products (mostly search features). It can complain a little too much about advanced / experimental structures, but the complaints are harmless. You should be able to see if it has successfully extracted the data, even if it doesn't entirely match what it wants.

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