thrift-iterator / go

decode/encode thrift message without IDL
Apache License 2.0
264 stars 30 forks source link

json: unsupported type: general.Map #12

Open c625473164 opened 5 years ago

c625473164 commented 5 years ago

thrifter.ToJSON got this error sometimes, any solution?

DMLayMan commented 3 years ago

I got this error too ... Is there any solution ?

DMLayMan commented 3 years ago

thrifter.ToJSON got this error sometimes, any solution? This will help.

Use github.com/json-iterator/go package instead of encode.json. It can encode map[interface{}]interface{} to JSON.

https://github.com/json-iterator/go