Skip to content

@-members question: treatment in objects nested under attributes? #1584

@freddrake

Description

@freddrake

Version 1.1 of the specification is clear about the treatment of @-members contained in the JSON:API-defined objects of a document, but it's unclear how they should be handled in objects nested under attributes (which are not JSON:API-defined, but are defined entirely by the types of the application.

For example, in this document:

{"data": {
   "type": "person",
   "id": "42",
   "attributes": {
     "@at-thing": "ignore this",
     "address": {
       "@comment": "Would be nice to live here!",
       "street": ["123 Main St.", "Suite 24"],
       "city": "Someplace Warm",
       "state": "CA",
       "postcode": "90120"
   },
   "links": {
     "self": "/api/people/42"
   }
 },
 "links": {
   "self": "/api/people/42?include[person]=address"
 }
}

the @at-thing member should clearly be ignored, but should @comment be dropped as non-JSON:API data, or should it be passed along to the application as part of the address field?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy