Hello,
I get Json error message as
json: cannot unmarshal string into Go value of type int
it takes some trial to find which field has a type mismatch, especially if the struct has many fields.
With type switch, I found the exact error was UnmarshalTypeError , but it doesn't has info about which struct field is it.
Is there a way to know which field raised this error.
Thanks.
type UnmarshalTypeError struct {
Value string // description of JSON value - "bool", "array", "number -5"
Type reflect.Type // type of Go value it could not be assigned to
}