JSON:API 1.1: "@-Members"

Created on 8 September 2023, 9 months ago

Problem/Motivation

@-Members

Member names MAY also begin with an at sign (U+0040 COMMERCIAL AT, β€œ@”). Members named this way are called β€œ@-Members”. @-Members MAY appear anywhere in a document.

This specification provides no guidance on the meaning or usage of @-Members, which are considered to be implementation semantics. @-Members MUST be ignored when interpreting this specification’s definitions and processing instructions given outside of this subsection. For example, an attribute is defined above as any member of the attributes object. However, because @-Members must be ignored when interpreting that definition, an @-Member that occurs in an attributes object is not an attribute.

Note: Among other things, β€œ@” members can be used to add JSON-LD data to a JSON:API document. Such documents should be served with an extra header to convey to JSON-LD clients that they contain JSON-LD data.

This part of JSON:API 1.1 adds a new member type, @-Members. These properties should not be interacted with in regards to parsing etc.

Steps to reproduce

Proposed resolution

What jsonapi could do, is provide an API to add @-Members to multiple layers.

  1. Ability to add an @-Member to an attribute (field)
  2. Ability to add an @-Member to a resource
  3. Ability to add an @-Member to a document

If we provide an API this could enable others to add @-Members to document to expose implementation details. Or perhaps integrate json-ld into jsonapi responses, helping the decoupled proposition of Drupal in a flexible way.

They are a flexibility addition.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
JSON APIΒ  β†’

Last updated 2 days ago

Created by

πŸ‡³πŸ‡±Netherlands bbrala Netherlands

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024