Not sure, if these are all valid.
I basically want to add links to my data. In HAL it probably would lool like this:
{
"_links": {
"self": {
"href": "https://example.com/users/1"
},
"mother": {
"href": "https://example.com/users/2"
},
"father": {
"href": "https://example.com/users/3"
}
},
"id": "1",
"name": "Jon Doe"
}
Payload with "inline unnamed self link":
{
"@id": "https://example.com/users/1",
"id": "1",
"name": "Philipp Zins"
}
Payload with "inline named self link":
{
"self": { "@id": "https://example.com/users/1" },
"id": "1",
"name": "Philipp Zins"
}
Payload with "named self link in @context":
{
"@context": {
"self": "@id"
},
"self": "https://example.com/users/1",
"id": "1",
"name": "Philipp Zins"
}
Payload with multiple "inline named links":
{
"@context": {
"self": "@id"
},
"self": "https://example.com/users/1",
"mother": {
"@id": "https://example.com/users/2"
},
"father": {
"@id": "https://example.com/users/3"
},
"id": "1",
"name": "Jon Doe"
}
Payload with multiple "named links in @context":
{
"@context": {
"self": "@id",
"mother": {
"@id": "http://schema.org/parent",
"@type": "@id"
},
"father": {
"@id": "http://schema.org/parent",
"@type": "@id"
}
},
"self": "https://example.com/users/1",
"mother": "https://example.com/users/2",
"father": "https://example.com/users/3",
"id": "1",
"name": "Jon Doe"
}