Skip to content

Clarification on returning array vs object for an individual resource #268

@chingor13

Description

@chingor13

From #237, a breaking change to how we should return individual resources was accepted.

Previously, we always returned an array for ease of processing. I realize it's from a year ago, but in #8, it seemed like "always return an array" was the accepted thinking.

BREAKING CHANGE: Singular resource objects SHOULD now be be represented with
JSON objects instead of arrays. This allows for symmetrical representations in
request and response documents, as well as PUT/POST requests and PATCH
operations. It also simplifies implementations which do not support batch
operations (i.e. they can allow an object and not an array).

This was the explanation and it seemed like there was scattered discussion within #237, but I haven't seen rationale as to why this change was accepted/desired?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No 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