During the Paris sprint, the Web Services initiative honed in on JSON-LD for the primary supported web service data format. This issue provides a roadmap to achieve support.
Note: This is in the core queue for now. However, the decision whether it should live in core is a separate discussion and there are a lot of factors to consider... this may end up living in contrib.
This issue is highly related to Step 5 in #1540656: [META] Entity Serialization API for web services (e.g. content staging).
Roadmap
Dependencies
- Entity API
- Routing
- JSON-LD spec
Step 1: Responding with JSON to JSON-LD requests
To start with, we need to be able to respond to requests for application/ld+json and provide a JSON object back which contains all of the properties.
#1797214: Document the slight lossiness of JSON-LD <-> RDF transformation- #1797210: Decide how to negotiate between the 2 JSON-LD serializations
- #1813328: Enable literal handling in common RDF-ish domain models
- #1810472: Add Symfony's Serializer component to core despite Symfony potentially releasing BC-breaking updates after 2.3.
- #1814864: Provide way to register serialization classes
- #1811510: Enable JSON-LD entity serialization
- #1838700: Decide on language handling for JSON-LD
- #1832840: Enable fieldtype-specific JSON-LD normalization
- #1803586: Give all entities their own URI
- #1830388: Decide on Serialization(JSON-LD, JSON, XML) support for non-entities/ConfigEntities
Step 2: Providing a context
For the returned JSON object to be used by JSON-LD tools, it needs to have a context.
- #1794958: Generate the @context for JSON-LD
- #1784198: Decide on a URI structure for site generated RDF vocabulary
- #1831286: Provide machine-readable description of entity/field/property
- #1778410: Throw exception when RDF namespaces collide ... Necessary for using external vocabularies
- Enable mapping to external vocabularies
- Create a user interface for managing external mappings
- Provide users a menu of external vocabularies to use
Step 3: Helping consumers use the data
Once we are returning objects that are consumable as JSON-LD, we can use other REST and Linked Data conventions to help consumers use data.
- #1838596: Add deserialize for JSON-LD
- #1880424: Handle entity references on import
- Decide how to serve lists of content
- Consider providing Link Headers http://tools.ietf.org/html/rfc5988
Comments
Comment #0.0
Anonymous (not verified) CreditAttribution: Anonymous commentedRearranged the headings and added intro.
Comment #0.1
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1794958: Generate the @context for JSON-LD
Comment #0.2
Anonymous (not verified) CreditAttribution: Anonymous commentedChanging title of step 1 and added descriptions to be clearer.
Comment #0.3
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1797210: Decide how to handle literal values in JSON-LD
Comment #0.4
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1797214: Decide whether slight lossiness of JSON-LD <-> RDF transformation is acceptable
Comment #0.5
Anonymous (not verified) CreditAttribution: Anonymous commentedCrossed off two completed issues.
Comment #0.6
Anonymous (not verified) CreditAttribution: Anonymous commentedCrossed off the routing issue.
Comment #0.7
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1732730: Implement the new entity field API for all field types, and moved external issues to dependencies.
Comment #0.8
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1803818: Make it possible to dynamically provide additional routes for entities and #1803586: Give all entities their own URI.
Comment #0.9
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1810472: Add Symfony's Serializer component to core.
Comment #0.10
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1811510: Enable JSON-LD entity serialization.
Comment #0.11
Anonymous (not verified) CreditAttribution: Anonymous commentedRearrage issue.
Comment #0.12
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1813328: Enable standard literal handling for RDF-ish domain models
Comment #0.13
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1814864: Provide way to register serialization classes.
Comment #0.14
Anonymous (not verified) CreditAttribution: Anonymous commentedRearranged.
Comment #0.15
Anonymous (not verified) CreditAttribution: Anonymous commentedRemoved #1803818.
Comment #0.16
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1830388: Decide whether/how JSON-LD works for non-entity paths
Comment #0.17
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1831286: Provide machine-readable description of entity/field/property.
Comment #0.18
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1832840: Add Normalizers for all levels of Typed Data API.
Comment #0.19
Anonymous (not verified) CreditAttribution: Anonymous commentedCrossed off language maps, added the two new alternate options.
Comment #0.20
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1838596: Add deserialize for JSON-LD
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedtagging
Comment #1.0
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded #1838700: Decide on language handling for JSON-LD
Comment #1.1
Anonymous (not verified) CreditAttribution: Anonymous commentedAdded 1880424: Handle entity references on import
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedPeople subscribed to this issue might be interested in #1924854: [META] Hypertext Application Language (HAL) support.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedJSON-LD was removed from D8 core.
Comment #3.0
Anonymous (not verified) CreditAttribution: Anonymous commentedMove deserialize issue to consumer section.