Skip to content

Instantly share code, notes, and snippets.

@gogogarrett
Created May 14, 2013 02:05
Show Gist options
  • Select an option

  • Save gogogarrett/5573108 to your computer and use it in GitHub Desktop.

Select an option

Save gogogarrett/5573108 to your computer and use it in GitHub Desktop.
// A Sample Map JSON object.
{
"_links": {
"self": { "href": "/map" }
},
"_embedded": {
"locations": [{
"_links": {
"self": { "href": "/purchase/trip/texas" },
},
"cost": 300.00,
"name": "Texas",
"lat": 10
"long": 10
}, {
"_links": {
"self": { "href": "/purchase/trip/japan" },
},
"cost": 300.00,
"name": "Japan",
"lat": 10
"long": 100
}]
}
}
// A Sample Location JSON object.
{
"_links": {
"self": { "href": "/location/japan" }
},
"_embedded": {
"postcards": [{
"_links": {
"self": { "href": "/purchase/postcards/happy-birthday" }
},
"cost": 3.00,
"name": "Happy Birthday",
}, {
"_links": {
"self": { "href": "/purchase/postcards/happy-easter" }
},
"cost": 3.50,
"name": "Happy Easter",
}],
"souvenirs": [{
"_links": {
"self": { "href": "/purchase/souvenirs/baseball" }
},
"cost": 30.00,
"name": "Baseball",
}, {
"_links": {
"self": { "href": "/purchase/souvenirs/tshirt" }
},
"cost": 15.50,
"name": "tshirt",
}],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment