encoding/json: Cannot expand this json into a struct #17521
Closed
Labels
Comments
Hello there @nemothekid, the issue there is that your sLabel field is an unexported value, making it SLabel instead of sLabel, makes in unmarshal-able. Please see https://play.golang.org/p/pmsIs2GW0O, The Unmarshal docs talk about it that Unmarshal will only set exported fields. Also we use the issue tracker for tracking bugs, you can post questions on the mailing list https://groups.google.com/forum/#!forum/golang-nuts. |
Ah, sorry - such an obvious mistake in hindsight. I've been staring at that piece of code for far too long. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?play/
go version go1.6.2 darwin/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
https://play.golang.org/p/pUe-e0u6cf
What did you expect to see?
sLabel.Value should be filled with a value.
What did you see instead?
Its empty
The text was updated successfully, but these errors were encountered: