Last active
August 29, 2015 14:05
-
-
Save mustmodify/4a88f1f588bda5d87bb1 to your computer and use it in GitHub Desktop.
drwho
This file contains hidden or 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
/* from item-level link */ | |
{ | |
"collection": { | |
"href": "/characters.json", | |
"embedded": [ | |
{ | |
"collection": { | |
"href": "/characters/the_doctor/actors.json", | |
"items": [ | |
{ | |
"href": "/doctors/1.json", | |
"data": [ | |
{ | |
"name": "full-name", | |
"value": "William Hartnell" | |
} | |
] | |
}, | |
{ | |
"href": "/doctors/2.json", | |
"data": [ | |
{ | |
"name": "full-name", | |
"value": "Patrick Troughton" | |
} | |
] | |
}, | |
{ | |
"href": "/doctors/3.json", | |
"data": [ | |
{ | |
"name": "full-name", | |
"value": "Jon Pertwee" | |
} | |
] | |
}, | |
{ | |
"href": "/doctors/4.json", | |
"data": [ | |
{ | |
"name": "full-name", | |
"value": "Tom Baker" | |
} | |
] | |
} | |
] | |
} | |
} | |
], | |
"items": [ | |
{ | |
"href": "/characters/the_doctor.json", | |
"links": [ | |
{ | |
"href": "/characters/the_doctor/actors.json", | |
"rel": "actors", | |
"render": "link", | |
"prompt": "Actors" | |
} | |
] | |
} | |
] | |
} | |
} |
This file contains hidden or 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
/* from root-level link */ | |
/* note that the link matches the URL of collection.embedded[0].collection.items[0].href, rather than | |
collection.embedded[0].collection.href. Is this an error state? Let's discuss. */ | |
{ | |
"collection": { | |
"href": "/doctors.json", | |
"embedded": [ | |
{ | |
"collection": { | |
"href": "/doctors/3.json", | |
"items": [ | |
{ | |
"href": "/doctors/3.json", | |
"data": [ | |
{ | |
"name": "full-name", | |
"value": "Jon Pertwee" | |
}, | |
{ | |
"name": "first-appearance", | |
"value": "1970-01-03" | |
}, | |
{ | |
"name": "last-appearance", | |
"value": "1974-06-08" | |
} | |
] | |
} | |
] | |
} | |
} | |
], | |
"links": [ | |
{ | |
"href": "/doctors/3.json", | |
"rel": "incarnation", | |
"render": "link", | |
"prompt": "Jon Pertwee" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment