Hi,
i have something like: https://play.golang.org/p/j5WhDMUTI-
type A struct {
Name string `json:"n"`
Typ byte `json:"t"`
}
JSON string:
j := `{"n":"test", "t":"x"}`
When I try to do
a := A{}
json.Unmarshal([]byte(j), &a)
I get error like: *json: cannot unmarshal string into Go value of type
uint8*
Any idea how to force unmarshaler to treat one character string as byte
using standard json lib?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.