collection-json / spec

Collection+JSON Specification
167 stars 16 forks source link

add OPTIONAL "rel" property to items... #14

Open mamund opened 9 years ago

mamund commented 9 years ago

in working w/ processing, filtering, and rendering individual items i am finding it quite helpful to include an OPTIONAL rel property as in:

"items" : [
  { "href" : "...",
    "rel" : "invoice",
    "data" : [...],
    "links" : [...]
  },
  { "href" : "...",
    "rel" : "lineItem",
    "data" : [...],
    "links" : [...]
  },
...
]

I propose adding the OPTIONAL rel property (the same definition already in use for queries and links) to the individual items.

NOTE: this is a backward-compatible change w/ no anticipated major negative side-effects for current implementations.