-
Notifications
You must be signed in to change notification settings - Fork 215
Unmarshal access to "meta" #82
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
Comments
The point of meta is to describe the response.. What's the point of submitting a request with meta to your api? If its a required field, it should be in attributes or another object? Not disagreeing, just wondering what the use-case is? |
My use case is actually for a response, I'd like to extract that meta result. Currently I'm unmarshaling twice to get it since the tags don't support getting it directly. |
Ahhh. Totally get it!!
…On Tue, Apr 11, 2017 at 6:43 PM Mitchell Hashimoto ***@***.***> wrote:
My use case is actually for a response, I'd like to extract that meta
result. Currently I'm unmarshaling twice to get it since the tags don't
support getting it directly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#82 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAADMA7wKz3DMiFBcPdOqS7W4jBEphjhks5rvAIJgaJpZM4MN9r_>
.
|
Hi there. Is there any update on this issue or the related #95 ? My use-case requires creating a go JSON API server and client, meaning I will need to marshal and unmarshal the data. More specifically, I would like access to the "meta" for a relationship, which seems to be already supported for marshalling (see https://github.com/google/jsonapi/blob/master/node.go#L59). My current options seem to be:
If anyone has any other potential workarounds, I'd be extremely grateful! |
func setDataIntoTarget(data *Data, target interface{}) error {} is missing following chunk of code which will resolve meta part of unmarshaling |
It'd be great to have access to an annotation type "meta" or some other way to easily access the Meta information from a JSON API document.
Currently I'm unmarshaling twice: once into
OnePayload
viaencoding/json
and again via the jsonapi unmarshal methods. It'd be wonderful to button this up.The text was updated successfully, but these errors were encountered: