any_tests
fix #313 support json marshaller type as map keyapi_tests
Revert "Merge pull request #418 from bbrks/configurable_maxDepth"benchmarks
benchmarks: add benchmark for Streamextension_tests
fix nil attachment on stream in custom encoder on sorted mapextra
fix: invalid unicode while binary to stringmisc_tests
jsoniter: Fix errors during reading integers from chunked io.Reader (#477)skip_tests
fix #37: add SkipAndAppendBytes iterator methodtype_tests
disable map_key_test temporarilyvalue_tests
encoding/json: use standard ES6 formatting for numbers during marshal.codecov.yml
import github.com/stretchr/testify/require.gitignore
fix #198, use dep for vendoring.travis.yml
travis: add 1.x to go versionsadapter.go
Fix typo in UnmarshalFromString documentationany_array.go
remove feature prefixany_bool.go
remove feature prefixany_float.go
remove feature prefixany_int32.go
remove feature prefixany_int64.go
remove feature prefixany_invalid.go
remove feature prefixany_nil.go
remove feature prefixany_number.go
remove feature prefixany_object.go
remove feature prefixany_str.go
fix any str ToInt64 ToUint64 panicany_uint32.go
remove feature prefixany_uint64.go
remove feature prefixany.go
fix #311 handle nil anybuild.sh
fix #198, use dep for vendoringconfig.go
fix issue #389 #411example_test.go
rename ExampleMyKeyfuzzy_mode_convert_table.md
update conversion tablego.mod
bumped stretchr to v1.8.0 to get rid of yaml v2 vulngo.sum
bumped stretchr to v1.8.0 to get rid of yaml v2 vulnGopkg.lock
add tests for #283Gopkg.toml
add tests for #283iter_array.go
Limit nesting depthiter_float.go
fix issue 510iter_int.go
fix issue 510iter_object.go
fix the error message typo of ReadObjectCB & ReadMapCb functioniter_skip_sloppy_test.go
remove feature prefixiter_skip_sloppy.go
Limit nesting depthiter_skip_strict.go
fix #317, try parse as BigFloat if overflowiter_skip.go
fix #37: add SkipAndAppendBytes iterator methoditer_str.go
remove feature prefixiter.go
Revert "Merge pull request #418 from bbrks/configurable_maxDepth"jsoniter.go
document public symbolsLICENSE
Initial commitpool.go
Release writer to enable GCREADME.md
fix go 1.18 compatibilityreflect_array.go
move reflect2 from plz to modern-goreflect_dynamic.go
move reflect2 from plz to modern-goreflect_extension.go
fix issue #449reflect_json_number.go
move reflect2 from plz to modern-goreflect_json_raw_message.go
fix issue #469reflect_map.go
encoding/json: allow non-string type keys for (un-)marshalreflect_marshaler.go
use json.Marshaler then trim the last '\n' in reflect_marshalerreflect_native.go
Don't marshal empty byte or uint8 slice as nullreflect_optional.go
temporarily comment out some test case to fix the CI fail since go1.14 releasedreflect_slice.go
move reflect2 from plz to modern-goreflect_struct_decoder.go
fixed null in number json tag string (#480)reflect_struct_encoder.go
fix nil attachment on stream in custom encoder on sorted mapreflect.go
fix issue 508stream_float.go
encoding/json: use standard ES6 formatting for numbers during marshalstream_int.go
gofmtstream_str.go
remove feature prefixstream_test.go
(*Stream).WriteMore: remove implicit Flushstream.go
(*Stream).WriteMore: remove implicit Flushtest.sh
fix coverageA high-performance 100% compatible drop-in replacement of "encoding/json"
Benchmark
Raw Result (easyjson requires static code generation)
| ns/op | allocation bytes | allocation times | |
|---|---|---|---|
| std decode | 35510 ns/op | 1960 B/op | 99 allocs/op |
| easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op |
| jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op |
| std encode | 2213 ns/op | 712 B/op | 5 allocs/op |
| easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op |
| jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op |
Always benchmark with your own workload. The result depends heavily on the data input.
Usage
100% compatibility with standard lib
Replace
import "encoding/json"
json.Marshal(&data)with
import jsoniter "github.com/json-iterator/go"
var json = jsoniter.ConfigCompatibleWithStandardLibrary
json.Marshal(&data)Replace
import "encoding/json"
json.Unmarshal(input, &data)with
import jsoniter "github.com/json-iterator/go"
var json = jsoniter.ConfigCompatibleWithStandardLibrary
json.Unmarshal(input, &data)How to get
go get github.com/json-iterator/goContribution Welcomed !
Contributors
Report issue or pull request, or email taowen@gmail.com, or