UBER example from: http://uberhypermedia.org
{
"uber": {
"version": "1.0",
"data": [
{"rel": ["self"], "url": "http://example.org/"},
{
"rel": ["profile"],
"url": "http://example.org/profiles/people-and-places"
},
{
"id": "people",
"rel": ["collection", "http://example.org/rels/people"],
"url": "http://example.org/people/",
"data": [
{
"name": "create",
"rel": ["http://example.org/rels/create"],
"url": "http://example.org/people/",
"model": "g={givenName}&f={familyName}&e={email}",
"action": "append"
},
{
"name": "search",
"rel": ["search", "collection"],
"url": "http://example.org/people/search{?givenName,familyName,email}",
"templated": "true"
},
{
"name": "person",
"rel": ["item", "http://example.org/rels/person"],
"url": "http://example.org/people/1",
"data": [
{"name": "givenName", "value": "Mike", "label": "First Name"},
{"name": "familyName", "value": "Amundsen", "label": "Last Name"},
{"name": "email", "value": "mike@example.org", "label": "E-mail"},
{
"name": "avatarUrl",
"transclude": "true",
"url": "http://example.org/avatars/1",
"value": "User Photo",
"accepting": ["image/*"]
}
]
},
{
"name": "person",
"rel": ["item", "http://example.org/rels/person"],
"url": "http://example.org/people/2",
"data": [
{"name": "givenName", "value": "Mildred", "label": "First Name"},
{"name": "familyName", "value": "Amundsen", "label": "Last Name"},
{
"name": "email",
"value": "mildred@example.org",
"label": "E-mail"
},
{
"name": "avatarUrl",
"transclude": "true",
"url": "http://example.org/avatars/2",
"value": "User Photo",
"accepting": ["image/*"]
}
]
}
]
},
{
"id": "places",
"rel": ["collection", "http://example.org/rels/places"],
"url": "http://example.org/places/",
"data": [
{
"name": "search",
"rel": ["search", "collection"],
"url": "http://example.org/places/search{?addressRegion,addressLocality,postalCode}",
"templated": "true"
},
{
"name": "place",
"rel": ["item", "http://example.org/rels/place"],
"url": "http://example.org/places/a",
"data": [
{"name": "name", "value": "Home"},
{
"name": "address",
"data": [
{
"name": "streetAddress",
"value": "123 Main Street",
"label": "Street Address"
},
{
"name": "addressLocalitly",
"value": "Byteville",
"label": "City"
},
{"name": "addressRegion", "value": "MD", "label": "State"},
{"name": "postalCode", "value": "12345", "label": "ZIP"}
]
}
]
},
{
"name": "place",
"rel": ["item", "http://example.org/rels/place"],
"url": "http://example.org/places/b",
"data": [
{"name": "name", "value": "Work"},
{
"name": "address",
"data": [
{
"name": "streetAddress",
"value": "1456 Grand Ave.",
"label": "Street Address"
},
{
"name": "addressLocalitly",
"value": "Byteville",
"label": "City"
},
{"name": "addressRegion", "value": "MD", "label": "State"},
{"name": "postalCode", "value": "12345", "label": "ZIP"}
]
}
]
}
]
}
]
}
}
{
"head": {
"curies": {"ex": "http://example.org/"}
},
"h:ref": {"self": "ex:", "profile" : "ex:profiles/people-and-places"},
"people": {
"h:link": [
{"uri": "ex:people", "rel": ["collection", "ex:rels/people"]}
],
"create": {
"h:link": [
{
"rel": ["ex:res/create"],
"uri": "ex:people",
"model": "g={givenName}&f={familyName}&e={email}",
"action": "append"
}
]
},
"search": {
"h:link": [
{
"rel": ["search", "collection"],
"url": "ex:people/search{?givenName,familyName,email}",
"template": {
"fields": {"givenName": {}, "familyName": {}, "email": {}}
}
}
]
},
"person": [
{
"h:link": [
{"rel": ["item", "ex:rels/person"], "url": "ex:people/1"}
],
"givenName": {"h:value": "Mike", "h:label": "First Name"},
"familyName": {"h:value": "Amundsen", "h:label": "Last Name"},
"email": {"h:value": "mike@example.org", "h:label": "E-mail"},
"avatarUrl": {
"h:link": [
{
"h:transclude": "true",
"uri": "ex:avatars/1",
"h:label": "User Photo"
}
]
}
},
{
"h:link": [
{"rel": ["item", "ex:rels/person"], "url": "ex:people/2"}
],
"givenName": {"h:value": "Mildred", "h:label": "First Name"},
"familyName": {"h:value": "Amundsen", "h:label": "Last Name"},
"email": {"h:value": "mildred@example.org", "h:label": "E-mail"},
"avatarUrl": {
"h:link": [
{
"h:transclude": "true",
"uri": "ex:avatars/2",
"h:label": "User Photo"
}
]
}
}
]
},
"places": {
"h:link": {
"uri": "ex:places/",
"rel": ["collection", "ex:rels/places"]
},
"search": {
"h:link": {
"rel": ["search", "collection"],
"uri": "ex:places/search{?addressRegion,addressLocality,postalCode}",
"template": {
"fields": {"addressRegion": {}, "addressLocality": {}, "postalCode": {}}
}
}
},
"place": [
{
"h:link": {"rel": ["item", "ex:rels/place"], "uri": "ex:places/a"},
"name": "Home",
"address": {
"streetAddress": {
"h:value": "123 Main Street",
"h:label": "Street Address"
},
"addressLocality": {"h:value": "Byteville", "h:label": "City"},
"addressRegion": {"h:value": "MD", "h:label": "state"},
"postalCode": {"h:value": "12345", "h:label": "ZIP"}
}
},
{
"h:link": {"rel": ["item", "ex:rels/place"], "uri": "ex:places/b"},
"name": "Work",
"address": {
"streetAddress": {
"h:value": "1456 Grand Ave.",
"h:label": "Street Address"
},
"addressLocality": {"h:value": "Byteville", "h:label": "City"},
"addressRegion": {"h:value": "MD", "h:label": "state"},
"postalCode": {"h:value": "12345", "h:label": "ZIP"}
}
}
]
}
}