Skip to content

Instantly share code, notes, and snippets.

@veganstraightedge
Last active November 3, 2015 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veganstraightedge/5dbc2de22cafe3abd67e to your computer and use it in GitHub Desktop.
Save veganstraightedge/5dbc2de22cafe3abd67e to your computer and use it in GitHub Desktop.
An exercise is converting jf2 (a draft work in progress) into compliant JSON API to see what it's like.
{
"links": {
"self": "http://tantek.com/2015/295/t2/example-simple-note",
"prev": "http://tantek.com/2015/295/t1/something",
"next": "http://tantek.com/2015/295/t3/something-else"
},
"data": [{
"type": "entry",
"id": "http://tantek.com/some-slug",
"attributes": {
"published": "2015-10-21T12:34-0700",
"category": ["simple", "example"],
"content": "Example of a simple note"
},
"relationships": {
"author": {
"data": {
"id": "http://tantek.com/",
"type": "card",
"attributes": {
"name": "Tantek Çelik",
"url": "http://tantek.com/"
},
"relationships": {
"photo": {
"data": {
"id": "http://tantek.com/photo.jpg",
"type": "image",
"attributes": {
"url": "http://tantek.com/photo.jpg"
}
}
}
}
}
}
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment