Skip to content

Define "set-like behavior" #100

@gabrielgrant

Description

@gabrielgrant

The text following the example of removing a comment from a photo states "to-many relationships have set-like behavior in JSON API"

I don't see this "set-like behavior" mentioned anywhere in the JSON Patch RFC, so it should be explicitly defined.

It seems there are four salient points:

  1. Sets are represented as JSON Arrays
  2. The order of that array should be explicitly ignored
  3. add operations should use only the end-of-the-array reference ("-") as their target
  4. References should be by ID rather than array index (see change link removal example to be "set-like" rather than "array-like" #99)

Does this sound good? If so, I can go ahead and submit a patch for this.

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