The current json implementation in the stdlib does not support a
catchall like that. Also, you cannot embed a map in a struct.
You can replace JIRAFields with a map[string]any. If there are keys
with known structures, you can do a map[string]json.RawMessage, and
then you can do json.Unmarshal(fields[knownKey],&knownStruct) for
those keys whose structure you know.
Alternatively, you can use a map[string]any, and use the mapstructure
library to unmarshal a map[string]any to a known struct.
> --
> 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
golang-nuts...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAA5t8VqfpZ7og6Zxobcy388Zbyj%2BnTGc-J0gW_LBj9ngrErg4w%40mail.gmail.com.