timshadel
11/13/2012 - 6:39 PM

Idea for using src + HTTP HEAD or GET with Accept headers for embedding items into Collection+JSON

Idea for using src + HTTP HEAD or GET with Accept headers for embedding items into Collection+JSON

{ "collection" :
  {
    "version" : "1.0",
    "href" : "http://example.org/friends/",

    "items" :
    [
      {
        "href" : "...",
        "data" :
        [
          {"name" : "avatar", "src" : "http://photos.org/mike"},
          {"name" : "name", "value" : "Mike Admunsen"},
          {"name" : "bio", "value" : "Once upon a time...."},
          {"name" : "passport-photo", "src" : "http://passports.org/mike"},
          {"name" : "inline-text", "prompt": "Backward-compatible Entry", "src" : "http://text.net/mike-msg", "value" : "http://text.net/mike-msg"}
        ],
        "links" :
        [
          {"rel" : "profile-page", "href" : "http://profile.org/mike"}
          {"rel" : "external-text", "href" : "http:/text.net/mike-msg"}
        ]
      }
    ]
  } 
}