Created
October 25, 2011 13:08
-
-
Save mikekelly/1312666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_links": { | |
"self": { "href": "/todo-list" }, | |
"search": { "href": "/todo-list/search;{searchterm}" }, | |
"description": { "href": "/todo-list/description" } | |
}, | |
"_embedded": { | |
"item": [ | |
{ | |
"_links": { | |
"self": { "href" : "http://example.com/tasks/126"}, | |
"next": { "href": "http://example.org/todos/make-some-tea" }, | |
"attachment": { "href": "http://home.com/tasks/126/attachment/1" } | |
}, | |
"title": "Find Mug", | |
"details": "Find the mug which can be said to be mine." | |
}, | |
{ | |
"_links": { | |
"self": { "href": "http://example.org/todos/make-some-tea" }, | |
"prev": { "href": "http://example.com/tasks/126" } | |
}, | |
"title": "Make tea", | |
"details": "For make drinking goodly tea that is green." | |
} | |
], | |
"owner": { | |
"_links": { | |
"self": { "href": "http://example.com/mike" }, | |
"friend": { "href": "http://example.com/mamund" } | |
}, | |
"name": "Mike", | |
"age": 36 | |
} | |
}, | |
"created_at": "2010-01-16", | |
"updated_at": "2010-02-21", | |
"summary": "An example list" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = getTodoListResource(); | |
list.summary //= "An example list" | |
list._links.search.href //= "/todo-list/search;{searchterm}" | |
list._embedded.item[0].title //= "Find Mug" | |
list._embedded.item[0]._links.attachment.href //= "http://home.com/tasks/126/attachment/1" | |
list._embedded.owner.name //= "Mike" | |
list._embedded.owner._links.friend.href //= "http://example.com/mamund" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment