Skip to content

Instantly share code, notes, and snippets.

@timshadel
Created November 13, 2012 18:39
Show Gist options
  • Save timshadel/4067566 to your computer and use it in GitHub Desktop.
Save timshadel/4067566 to your computer and use it in GitHub Desktop.
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"}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment