I have several large json files that are slightly different in types that contain fields.
{ "a":"1" }
against.
{ "a":1 }
When I cancel the second, I get:
cannot unmarshal number into Go value of type string
However, since these jsons are large, I would like to have an actual field, which is an error, so I can fix them. UnmarshalTypeErrordoes not contain a Struct field type.
Does anyone know how to get to the field name? (not debugging, I have many different fields that are wrong)
[EDIT] I know how to solve type conversion. I need a method to see which fields I need to apply for conversion.
source
share