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
when unmarshaling data that was marshaled with the "included" portion (using GetReferencedStructs interface) the jsonapi unmarshaling does not add the included.
I'd suggest some interface like SetToOneReferencedStructs(name string, referenced interface{}) and SetToManyReferencedStructs(name string, referenced []interface{}) as we do with the IDs to allow the user to decide for themselves if they want or not to unmarshal included structs.
Another option is to add more struct tags to identify the relations (like https://github.com/google/jsonapi does) and do at least a part of the unmarshaling automatically
The text was updated successfully, but these errors were encountered:
when unmarshaling data that was marshaled with the "included" portion (using
GetReferencedStructs
interface) the jsonapi unmarshaling does not add the included.I'd suggest some interface like
SetToOneReferencedStructs(name string, referenced interface{}) and SetToManyReferencedStructs(name string, referenced []interface{})
as we do with the IDs to allow the user to decide for themselves if they want or not to unmarshal included structs.Another option is to add more struct tags to identify the relations (like https://github.com/google/jsonapi does) and do at least a part of the unmarshaling automatically
The text was updated successfully, but these errors were encountered: