Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created February 28, 2015 11:42
Show Gist options
  • Select an option

  • Save javaeeeee/ce6f6be2e6b91417626d to your computer and use it in GitHub Desktop.

Select an option

Save javaeeeee/ce6f6be2e6b91417626d to your computer and use it in GitHub Desktop.
HAL representation with embedded objects
{
"_links":{
"self":{
"href":"/author/4554"
},
"curries":[
{
"name":"ns",
"href":"http://booklistapi.com/rels/{rel}",
"templated":true
}
]
},
"_embedded":{
"ns:books":[
{
"_links":{
"self":{
"href":"/books/123"
}
},
"Title":"RESTful Web APIs",
"Price":"$31.92"
},
{
"_links":{
"self":{
"href":"/books/366"
}
},
"Title":"RESTful Web Services",
"Price":"$79.78"
},
{
"_links":{
"self":{
"href":"/books/865"
}
},
"Title":"Ruby Cookbook",
"Price":"$34.35"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment