Releases: goccy/go-json
Releases · goccy/go-json
0.6.1
0.6.0
Support Colorize option for encoding (#233)
b, err := json.MarshalWithOption(v, json.Colorize(json.DefaultColorScheme))
if err != nil {
...
}
fmt.Println(string(b)) // print colored json
Refactor
0.5.1
0.5.0
0.4.14
Benchmark
Fix decoder
- Fix decoding of slice with unmarshal json type ( #198 )
- Fix decoding of null value for interface type that does not implement Unmarshaler ( #205 )
- Fix decoding of null value to []byte by json.Unmarshal ( #206 )
- Fix decoding of backslash char at the end of string ( #207 )
- Fix stream decoder for null/true/false value ( #208 )
- Fix stream decoder for slow reader ( #211 )
Performance
- If cap of slice is enough, reuse slice data for compatibility with encoding/json ( #200 )
0.4.13
0.4.12
0.4.11
0.4.10
0.4.9
Add debug mode
If you use json.MarshalWithOption(v, json.Debug())
and panic
occurred in go-json
, produces debug information to console.
Support a new feature for compatible with encoding/json
- invalid UTF-8 is coerced to valid UTF-8 ( without performance down )
Fix encoder
- Fixed handling of MarshalJSON of function type
Fix decoding of slice of pointer type
If there is a pointer value, go-json will use it. (This behavior is necessary to achieve the ability to prioritize pre-filled values). However, since slices are reused internally, there was a bug that referred to the previous pointer value. Therefore, it is not necessary to refer to the pointer value in advance for the slice element, so we explicitly initialize slice element by nil
.