json-iterator/go
A high-performance 100% compatible drop-in replacement of "encoding/json"
📋 Changes
- Fixed json iter doesn't work properly with nil RawMessage #469
- Fixed null in number json tag string (#480)
- Fixed errors during reading integers from chunked io.Reader #477
- Fixed nil pointer panic when Unmarshal with a empty file #508
- Fixed [float string]different result vs origin after call Marshal & Unmarshal #510
📋 Changes
- Fix #459 map keys of custom types should serialize using `MarshalText` when available
- Fix potential panic in `(*stringAny).ToInt64` and `(*stringAny).ToUint64`(see #450)
- Fix #449 do NOT marshal the field whose name start with underscore
- Reuse stream buffer and remove flush in `(*Stream).WriteMore`(see #441 #440)
- Fix #421 simplify the error string returned by the decoder when it meets error unmarshaling anonymous structs
- Fix #389 #411 do NOT marshal the `json.RawMessage` type field whose real type is integer/float as "null" with `ValidateJsonRawMessage` option enabled
- Fix #326 do Not marshal private field after calling `extra.SetNamingStrategy()` to register naming strategy extension
📋 Changes
- fix #311 handle nil any
- fix #313 support json marshaller type as map key
- fix #308 do NOT skip embedded structs without tag when OnlyTaggedField
- fix #317, try parse as BigFloat if overflow
- Fix trailing newline
fix #293 copy extensions fix #286 calcHash should use byte not rune to calc hash fix #291 omit empty was not handled properly for json raw message fix #295 decoder more was not compatible with standard library
📋 Changes
- fix #250 case insensitive field match
- explit test case sensitive for #252
- fix #261 should load from reader
- fix #260, support rename for extra.SupportPrivateFields
- fix #263, support empty string as 0 in fuzz mode
- fix #264 check io.EOF when test decoder.More
- fix #274, unescape before base64 decode
- Merge pull request #282 from caesarxuchao/optional-case-sensitivity
- + 1 more
📋 Changes
- fix #245, always reuse existing value even UseNumber
- expose DecoderOf and EncoderOf
- suport encode map[interface{}]interface{}
The reflect2 dependency has been pulled out from plz into its own. Also use concurrent.Map to wrap sync.Map for 1.8 support.
do not hard code IntSize and PtrSize to 64
Instead of let unsafe cast spread across the codebase, starting from 1.1.0, json-iterator use reflect2 (https://github.com/v2pro/plz/tree/master/reflect2) package to implement unsafe reflection. Aslo the map encoder/decoder has been rewritten to use unsafe reflection.
📋 Changes
- support DisallowUnknownFields in golang 1.10
- fix #236 distinguish upper/lower field names
- improve marshal performance by https://github.com/json-iterator/go/pull/234
📋 Changes
- use sync.Map or mutex to make encoder/decoder cache thread safe
- fix #198 use vendoring
- fix #200 removed symbolic link
- fix #202 crash on custom map encoder
- fix #207 Encoding nil pointer to struct containing exported function leads to marshalling error
- fix #214 do not wrap EOF
- fix #217 when input is "null", should not report error for unmarshallable type
- fix #219 nested field with json tag 'omitempty' should not be marshalled if it has zero value
- + 2 more
#190 jsoniter.Get([]byte("")) will panic #191 support string escape for object fields #194 handle array larger than 1Gb #195 better error message when decoding float as int #197 placeholderEncoder encodes interface{} incorrectly, causing fatal error
📋 Changes
- do not report error when field is unexported
- #178 SkipAndReturnBytes should return copy of memory
- #177 flush buffer should check available again
- #180, add missing methods to jsoniter.Number
- #181, support string as json.Number and jsoniter.Number
- #184, support null as number
- #183 limit error message size
- #185 add jsoniter.Valid
📋 Changes
- https://github.com/json-iterator/go/pull/172
- https://github.com/json-iterator/go/pull/173
- https://github.com/json-iterator/go/pull/170
- https://github.com/json-iterator/go/pull/168
- https://github.com/json-iterator/go/pull/167
- added ValidateJsonRawMessage: true to ConfigCompatibleWithStandardLibrary
