francoispqt / gojay

high performance JSON encoder/decoder with stream API for Golang
MIT License
2.11k stars 112 forks source link

Problem with gojay generator #81

Closed xocasdashdash closed 5 years ago

xocasdashdash commented 5 years ago

I'm trying to decode this structure

type MyVeryOwnMap map[string]string

type MyStruct struct {
    Properties   MyVeryOwnMap `gojay:"properties"`
}

In the end the gojay generator is trying to generate this code:

    enc.AnyKey("properties", v.Properties)

But that method is nowhere, How can I get gojay to encode (and decode) a map[string]string

Is the generator the right way of using this library? Thanks!

xocasdashdash commented 5 years ago

Sorry!