Created
February 9, 2014 02:10
-
-
Save mamund/8893149 to your computer and use it in GitHub Desktop.
sample Uber in JSON and XML
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
{ | |
"uber" : | |
{ | |
"version" : " 1.0", | |
"data" : | |
[ | |
{"rel" : "self", "url" : "http://example.org/"}, | |
{"rel" : "profile", "url" : "http://example.org/profiles/people-and-places"}, | |
"data" : | |
[ | |
{"id" : "people", "rel" : "collection", "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", | |
"url" : "http://example.org/people/search", | |
"model" : "g={givenName}&f={familyName}&e={email}" | |
}, | |
{ | |
"name" : "person", | |
"rel" : "item", | |
"url" : "http://example.org/people/1", | |
"data" : | |
[ | |
{"name" : "givenName", "value" : "Mike"}, | |
{"name" : "familyName", "value" : "Amundsen"}, | |
{"name" : "email", "value" : "[email protected]"} | |
] | |
}, | |
{ | |
"name" : "person", | |
"rel" : "item", | |
"url" : "http://example.org/people/2", | |
"data" : | |
[ | |
{"name" : "givenName", "value" : "Mildred"}, | |
{"name" : "familyName", "value" : "Amundsen"}, | |
{"name" : "email", "value" : "[email protected]"} | |
] | |
} | |
], | |
{"id" : "places", "rel" : "collection", "url" : "http://example.org/places/"}, | |
"data" : | |
[ | |
{ | |
"name" : "search", | |
"rel" : "search", | |
"url" : "http://example.org/places/search", | |
"model" : "r={addressRegion}&l={addressLocality}&p={postalCode}" | |
}, | |
{ | |
"name" : "place", | |
"rel" : "item", | |
"url" : "http://example.org/places/a", | |
"data" : | |
[ | |
{"name" : "name", "value" : "Home"}, | |
"data" : | |
[ | |
{"name" : "streetAddress", "value" : "123 Main Street"}, | |
{"name" : "addressLocalitly", "value" : "Byteville"}, | |
{"name" : "addressRegion", "value" : "MD"}, | |
{"name" : "postalCode", "value" : "12345"} | |
] | |
] | |
}, | |
{ | |
"name" : "place", | |
"rel" : "item", | |
"url" : "http://example.org/places/b", | |
"data" : | |
[ | |
{"name" : "name", "value" : "Work"}, | |
"data" : | |
[ | |
{"name" : "streetAddress", "value" : "1456 Grand Ave."}, | |
{"name" : "addressLocalitly", "value" : "Byteville"}, | |
{"name" : "addressRegion", "value" : "MD"}, | |
{"name" : "postalCode", "value" : "12345"} | |
] | |
] | |
} | |
] | |
] | |
] | |
} | |
} |
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
<uber version="1.0"> | |
<data rel="self" url="http://example.org/" /> | |
<data rel="profile" url="http://example.org/profiles/people-and-places/" /> | |
<data id="people" rel="collection" url="http://example.org/people/"> | |
<data name="create" | |
rel="http://example.org/people/create" | |
url="http://example.org/people/" | |
model="g={givenName}&f={familyName}&e={email}" | |
action="append" /> | |
<data name="search" | |
rel="search" | |
url="http://example.org/search" | |
model="g={givenName}&f={familyName}&e={email}" /> | |
<data name="person" rel="item" url="http://example.org/people/1"> | |
<data name="givenName">Mildred</data> | |
<data name="familyName">Amundsen</data> | |
<data name="email">[email protected]</data> | |
</data> | |
<data name="person" rel="item" url="http://example.org/people/2"> | |
<data name="givenName">Mildred</data> | |
<data name="familyName">Amundsen</data> | |
<data name="email">[email protected]</data> | |
</data> | |
</data> | |
<data id="places" rel="collection" url="http://example.org/places/"> | |
<data name="search" rel="search" | |
url="http://example.org/search" | |
model="r={addressRegion}&l={addressLocality}&p={postalCode}" /> | |
<data name="place" url="http://example.org/places/1"> | |
<data name="name">Home</data> | |
<data name="address"> | |
<data name="streetAddress">123 Main</data> | |
<data name="addressLocality">Byteville</data> | |
<data name="addressRegion">MD</data> | |
<data name="postalCode">12345</data> | |
</data> | |
</data> | |
<data name="place" url="http://example.org/places/2"> | |
<data name="name">Work</data> | |
<data name="address"> | |
<data name="streetAddress">456 Grand Ave.</data> | |
<data name="addressLocality">Byteville</data> | |
<data name="addressRegion">MD</data> | |
<data name="postalCode">12345</data> | |
</data> | |
</data> | |
</data> | |
</uber> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment