Skip to content

Instantly share code, notes, and snippets.

@mamund
Created January 25, 2011 02:39
Show Gist options
  • Save mamund/794419 to your computer and use it in GitHub Desktop.
Save mamund/794419 to your computer and use it in GitHub Desktop.
JSON Link Standardization Examples
/* some suggestions on implementing hyperlinks in json */
// 5988-style (http://tools.ietf.org/html/rfc5988)
{ "link" :
{
"href" : "...",
"rel" : "...",
"hreflang" : "...",
"media" : "...",
"title" : "...",
"title*" : "...",
"type" : "..."
}
};
// xlink-style (http://www.w3.org/TR/xlink11/)
{ "xlink" :
{
"type" : "...",
"href" : "...",
"title" : "...",
"role" : "...",
"arcrole" : "...",
"show" : "...",
"actuate" : "...",
"label" : "...",
"from" : "...",
"to" : "..."
}
};
// proposal: start w/ 5988, add 'id' from HTML, 'show' & 'actuate' from XLink
{ "jlink" :
{
"id" : "...",
"href" : "...",
"rel" : "...",
"hreflang" : "...",
"media" : "...",
"title" : "...",
"title*" : "...",
"type" : "..."
"show" : "...",
"actuate" : "..."
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment