-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unmarshal of object/struct attributes fails #74
Comments
Any news about this issue? Thanks. |
We have been actively working on this feature in the branch https://github.com/google/jsonapi/tree/feature/embeded-structs |
Is work on this still progressing? My case is similar but here is my code: type Profile struct { type Avatar struct { I tried this with the current embeded-structs branch and it didn't work. Any status on this would be appreciated. The marshal function returned what I expected but the unmarshal returned an error ("data is not a jsonapi representation of '*jsonapi.Profile"). |
same issue here. Can't unmarshal the json to the struct with attributes that a objects.... Can't even find any workaround. |
any update on this issue? It seems we can't use arrays of simple types inside attributes either: https://go.dev/play/p/3qufy0gFk3u |
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
The global run tasks feature updates both the Organization and Workspace Run tasks with new attributes. Unfortunately these new attributes exposed an issue with the JSON API pacakge, that it doesn't support complex objects (Custom maps or non-standard types) [1]. Instead we need to unmarshall to a more simpler object and then we adapt the simpler object to our more correct struct. [1] google/jsonapi#74
Hello,
I am trying to unmarshal a JSON API response which contains attributes that are objects. I tried marshaling and the result JSON is correct but when I try to unmarshal that same JSON it fails with
data is not a jsonapi representation of '*main.Profile'
. Here is some example code:I also tried annotating with attr like
but no luck.
The text was updated successfully, but these errors were encountered: