Skip to content

Instantly share code, notes, and snippets.

@mamund
Last active October 6, 2015 15:56
Show Gist options
  • Select an option

  • Save mamund/3cab4fc9cfaea57cf6eb to your computer and use it in GitHub Desktop.

Select an option

Save mamund/3cab4fc9cfaea57cf6eb to your computer and use it in GitHub Desktop.
example HAL+JSON output from representor
{
"_links": {
"self": {
"href": "http://localhost:8282/user/mamund"
},
"profile": {
"href": "http://localhost:8282/big-todo-alps.json"
},
"http://localhost:8282/files/hal-docs.html#home": {
"href": "http://localhost:8282/",
"title": "Home",
"templated": false
},
"http://localhost:8282/files/hal-docs.html#usercollection": {
"href": "http://localhost:8282/user/",
"title": "All Users",
"templated": false
},
"http://localhost:8282/files/hal-docs.html#useradd": {
"href": "http://localhost:8282/user/",
"title": "Add User",
"templated": false
},
"http://localhost:8282/files/hal-docs.html#userfindbyname": {
"href": "http://localhost:8282/user/{?fn,gn}",
"title": "Users by Name",
"templated": true
},
"http://localhost:8282/files/hal-docs.html#userfindbyuser": {
"href": "http://localhost:8282/user/{?q}",
"title": "Users by UserName",
"templated": true
},
"http://localhost:8282/files/hal-docs.html#userchangepw": {
"href": "http://localhost:8282/user/changepw/mamund",
"title": "Change Password"
},
"http://localhost:8282/files/hal-docs.html#userupdate": {
"href": "http://localhost:8282/user/update/mamund",
"title": "Update User"
}
},
"userName": "mamund",
"familyName": "Amundsen",
"givenName": "Mike",
"password": "p@ss",
"webUrl": "http://amundsen.com/blog/",
"avatarUrl": "https://pbs.twimg.com/profile_images/340449683/madmen_icon_normal.jpg",
"id": "mamund",
"dateCreated": "2015-01-06T01:38:55.147Z",
"dateUpdated": "2015-01-25T02:28:12.402Z"
}
{
"_links": {
"self": {
"href": "http://localhost:8282/user/"
},
"profile": {
"href": "http://localhost:8282/big-todo-alps.json"
},
"http://localhost:8282/files/hal-docs.html#home": {
"href": "http://localhost:8282/",
"title": "Home",
"templated": false
},
"http://localhost:8282/files/hal-docs.html#usercollection": {
"href": "http://localhost:8282/user/",
"title": "All Users",
"templated": false
},
"http://localhost:8282/files/hal-docs.html#useradd": {
"href": "http://localhost:8282/user/",
"title": "Add User",
"templated": false
},
"http://localhost:8282/files/hal-docs.html#userfindbyname": {
"href": "http://localhost:8282/user/{?fn,gn}",
"title": "Users by Name",
"templated": true
},
"http://localhost:8282/files/hal-docs.html#userfindbyuser": {
"href": "http://localhost:8282/user/{?q}",
"title": "Users by UserName",
"templated": true
},
"http://localhost:8282/files/hal-docs.html#user": [
{
"href": "http://localhost:8282/user/lee",
"title": "lee"
},
{
"href": "http://localhost:8282/user/mamund",
"title": "mamund"
}
]
}
}
@mamund
Copy link
Author

mamund commented May 21, 2015

These examples were created (over several iterations) w/ the help/advice of a handful of ppl on the HAL Discuss list (see thread here:https://groups.google.com/d/msg/hal-discuss/cyhTK6M_bmk/0RkZlXj1IzIJ)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment