ugorji / go

idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
MIT License
1.86k stars 295 forks source link

Compatibility with `encoding/json` #328

Closed junchih closed 4 years ago

junchih commented 4 years ago

hi guys,

will this library be compatible with the official golang json library encoding/json? I just noticed that we've defined a Raw data type https://github.com/ugorji/go/blob/master/codec/helper.go#L1063. which will cause the modification of caller's data structure to use this library. is that ok?

ugorji commented 4 years ago

codec is not 100% compatible with encoding/json, by design. There are some areas that we decided that a different way of resolving will be better. However, these are on the edges. For most uses, there is great compatibility.