Skip to content

Instantly share code, notes, and snippets.

@camshaft
Forked from timshadel/src-head.json
Created November 13, 2012 18:42
Show Gist options
  • Save camshaft/4067585 to your computer and use it in GitHub Desktop.
Save camshaft/4067585 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", "value": "Photo of Mike", "src" : "http://photos.org/mike"},
{"name" : "name", "value" : "Mike Admunsen"},
{"name" : "bio", "value" : "Once upon a time...."},
{"name" : "inline-text", "value": "Inline Text Example", "src" : "http://text.net/mike-msg"}
],
"links" :
[
{"rel" : "profile-page", "href" : "http://profile.ord/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