You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Namespaces are originally designed for link-relations and action names since these have a history of using URIs for identifiers.
The same idea could as well be applied to API data such that it becomes possible to mix data from different sources without name collisions (much like XML namespaces). That might though be too complicated to be worth it.
Example:
{
"@namespaces":
{
"n1": { name: "acme.inc" },
"n2": { name: "sultan.inc" }
},
"n1:Title": "Title for Acme data",
"n2:Title": "Title for Sultan data",
...
}
One could also simply use sub-properties:
{
"acme.inc":
{
"title: "Title for Acme data"
},
"sultan.inc":
{
"title: "Title for Sultan data"
},
...
}
The text was updated successfully, but these errors were encountered:
One thing I noticed with Mason is a lack of specifying the link relation type for embedded resources. That's where something like this would come in handy. However, when it comes to using IANA-registered link relations, the problem still remains since there's no need for a URI.
Namespaces are originally designed for link-relations and action names since these have a history of using URIs for identifiers.
The same idea could as well be applied to API data such that it becomes possible to mix data from different sources without name collisions (much like XML namespaces). That might though be too complicated to be worth it.
Example:
One could also simply use sub-properties:
The text was updated successfully, but these errors were encountered: