pquerna / ffjson

faster JSON serialization for Go
Apache License 2.0
2.97k stars 234 forks source link

*json.RawMessage as map value doesn't work #235

Open zplzpl opened 7 years ago

zplzpl commented 7 years ago

type Aggs map[string]*json.RawMessage

ffjson error: (*errors.errorString)json.RawMessage: UnmarshalJSON on nil pointer offset=48212 line=1 char=48212

erikdubbelboer commented 7 years ago

Maybe try this until it gets fixed:

type Aggs map[string]json.RawMessage

Or do you really need it to be a pointer? Since json.RawMessage is just a []byte a pointer is usually not necessary.