Two JSON-LDs for Drupal

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
linclark's picture

It looks like we will require two different serializations of JSON-LD. The current proposal is to serve them with two different media types:

  • application/ld+json
  • application/vnd.drupal.ld+json

You can weigh in on the decision of how to negotiate between the two.

Why do we need two?

As I outline in the issue, most consumers of RDF-ish formats like JSON-LD expect that literal values will be handled in a certain way. An example of this is Schema.org, which expects the body and summary of an article to be direct properties of the article.

Only local images are allowed.

In Drupal, we model this differently. There is an intermediary data structure, which contains the body value, summary, and format.

Only local images are allowed.

We want to continue to use our own model when communicating to other Drupal instances, but also be able to communicate with external consumers who model literals in a more standard way. This is why we need two different serializations.

What you can do

Please review these issues if you have plans to consume JSON-LD in core or contrib modules... CreateJS and Deploy, I'm looking at you ;) You can also ping in IRC.