Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
39 lines (33 sloc) 1.302 kb

Inline Collections

Support inline collections[1].

  1. Add an optional top-level object inline as a child of collection
  2. Add an optional property to the link object: length (number)
  3. Add an optional property to the link object: inline (boolean)
{ "collection" :
  {
    "version" : "1.0",
    "href" : "http://example.org/posts/",

    "items" : [
      {
        "href" : "http://example.org/posts/1",
        "data" : [
          {"name" : "full-name", "value" : "J. Doe", "prompt" : "Full Name"},
          {"name" : "email", "value" : "jdoe@example.org", "prompt" : "Email"}
        ],
        "links": [
          { "rel": "comments", "href": "http://example.org/comments/1,2,3,4", "length": 4, "inline":true },
          { "rel": "examples", "href": "http://example.org/examples/a,b,c", "length": 3, "inline":true },
          { "rel": "author", "href": "http://example.org/author/mamund"}
        ]
      }
    ],
    "inline": {
      "http://example.org/comments/1,2,3,4": { /* embedded collection+json */ },
      "http://example.org/examples/a,b,c": { /* embedded collection+json */ }
    }
  }
}

References

  1. https://groups.google.com/forum/?fromgroups#!topic/collectionjson/JPNpy0Wx0r0
Jump to Line
Something went wrong with that request. Please try again.