easyjson
easyjson copied to clipboard
Usage with go maps
Is it possible to use this library on a map with strings as keys? The map contains objects that I want to be marshaled by easyjson, but I also would like to keep the keys in my output JSON.
I've searched around for an example, but I did not easily find something.
Thanks!
You can use easyjson generator if you declare new separate type for you map:
type MyMap map[string]MyStruct
and mark it with easyjson generator tag