JSON:API 1.1: "@-Members"

Created on 8 September 2023, about 1 year 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 10 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.71.5 2024