Closed
Description
Given a struct that contains another struct:
type Address struct {
City string `jsonapi:"attr,city" json:"city"`
State string `jsonapi:"attr,state" json:"state"`
}
type AdditionalInfo struct {
HomeAddress *Address `jsonapi:"attr,homeaddress" json:"homeaddress"`
Phone *string `jsonapi:"attr,phone" json:"phone"`
}
When calling UnmarshalPayload
with this json:
{
"homeaddress": {
"city": "brooklyn",
"state": "NY"
},
"phone": "555-555-5555"
}
I get an error data is not a jsonapi representation of AdditionalInfo
. Are nested structs not supported?
Metadata
Metadata
Assignees
Labels
No labels