Closed alok87 closed 4 years ago
The array has different kinds of values, strings and objects, so decoding it properly isn't obvious because there is no one type that fits it, you have to use type assertions to get what you want or implement a custom unmarshaler.
Closing, as this is more a question about Go than this project.
Program
https://play.golang.org/p/RCIvR0wGjvZ
Error
panic: json: cannot unmarshal object into Go struct field Fields.fields.type of type []interface {}
More Info: https://stackoverflow.com/questions/63564543/decode-a-debeuzium-event-schema-into-a-meaningful-datastructure-in-golang
Question
Please suggest why such jsons are not converting and would be right go type for this scenario?