Hello - I am new to json:api. I understand data fields allow for nested json objects.
I am looking for some clarification regarding namespace specification for attributes.
From JSON:API — Latest Specification (v1.1)
Fields for a resource object MUST share a common namespace with each other and with
type
andid
. In other words, a resource can not have an attribute and relationship with the same name, nor can it have an attribute or relationship namedtype
orid
.
Does this apply to nested properties as well, which is to say I cannot have “bar” appear in both “foo” and “foo1” attributes?
...
"data": {
"id": "1",
"type": "yes",
"attributes": {
"foo": {
"bar": "hi"
},
"foo1": {
"bar": "hello"
}
}