CrazyMax 307c94e5c7
vendor: update buildkit to 2f99651
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
..
.codecov.yml vendor: initial vendor
.gitignore vendor: initial vendor
.travis.yml vendor: initial vendor
Gopkg.lock vendor: initial vendor
Gopkg.toml vendor: initial vendor
LICENSE vendor: initial vendor
README.md vendor: update buildkit to 2f99651
adapter.go Bump buildkit to master and fix versions incompatible with go mod 1.13
any.go vendor: initial vendor
any_array.go vendor: initial vendor
any_bool.go vendor: initial vendor
any_float.go vendor: initial vendor
any_int32.go vendor: initial vendor
any_int64.go vendor: initial vendor
any_invalid.go vendor: initial vendor
any_nil.go vendor: initial vendor
any_number.go vendor: initial vendor
any_object.go vendor: initial vendor
any_str.go vendor: update buildkit with typed errors support
any_uint32.go vendor: initial vendor
any_uint64.go vendor: initial vendor
build.sh vendor: initial vendor
config.go vendor: update buildkit with typed errors support
fuzzy_mode_convert_table.md vendor: initial vendor
go.mod vendor: update buildkit to 2f99651
go.sum vendor: update buildkit to 2f99651
iter.go vendor: update buildkit with typed errors support
iter_array.go vendor: update buildkit with typed errors support
iter_float.go Generate YAML doc
iter_int.go Generate YAML doc
iter_object.go vendor: update buildkit with typed errors support
iter_skip.go Bump buildkit to master and fix versions incompatible with go mod 1.13
iter_skip_sloppy.go vendor: update buildkit with typed errors support
iter_skip_strict.go vendor: initial vendor
iter_str.go vendor: initial vendor
jsoniter.go vendor: initial vendor
pool.go vendor: initial vendor
reflect.go Generate YAML doc
reflect_array.go vendor: initial vendor
reflect_dynamic.go vendor: initial vendor
reflect_extension.go vendor: update buildkit with typed errors support
reflect_json_number.go vendor: initial vendor
reflect_json_raw_message.go Generate YAML doc
reflect_map.go vendor: update buildkit with typed errors support
reflect_marshaler.go vendor: update buildkit with typed errors support
reflect_native.go Bump buildkit to master and fix versions incompatible with go mod 1.13
reflect_optional.go vendor: update buildkit with typed errors support
reflect_slice.go vendor: initial vendor
reflect_struct_decoder.go Generate YAML doc
reflect_struct_encoder.go vendor: update buildkit with typed errors support
stream.go vendor: update buildkit with typed errors support
stream_float.go Bump buildkit to master and fix versions incompatible with go mod 1.13
stream_int.go vendor: initial vendor
stream_str.go vendor: initial vendor
test.sh vendor: initial vendor

README.md

Sourcegraph GoDoc Build Status codecov rcard License Gitter chat

A high-performance 100% compatible drop-in replacement of "encoding/json"

Benchmark

benchmark

Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/github.com/json-iterator/go-benchmark/benchmark_medium_payload_test.go

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)

More documentation

How to get

go get github.com/json-iterator/go

Contribution Welcomed !

Contributors

Report issue or pull request, or email taowen@gmail.com, or Gitter chat