gaoyagang 94d8eabe3d fit: init project hace 1 año
..
.codecov.yml 94d8eabe3d fit: init project hace 1 año
.gitignore 94d8eabe3d fit: init project hace 1 año
.travis.yml 94d8eabe3d fit: init project hace 1 año
Gopkg.lock 94d8eabe3d fit: init project hace 1 año
Gopkg.toml 94d8eabe3d fit: init project hace 1 año
LICENSE 94d8eabe3d fit: init project hace 1 año
README.md 94d8eabe3d fit: init project hace 1 año
adapter.go 94d8eabe3d fit: init project hace 1 año
any.go 94d8eabe3d fit: init project hace 1 año
any_array.go 94d8eabe3d fit: init project hace 1 año
any_bool.go 94d8eabe3d fit: init project hace 1 año
any_float.go 94d8eabe3d fit: init project hace 1 año
any_int32.go 94d8eabe3d fit: init project hace 1 año
any_int64.go 94d8eabe3d fit: init project hace 1 año
any_invalid.go 94d8eabe3d fit: init project hace 1 año
any_nil.go 94d8eabe3d fit: init project hace 1 año
any_number.go 94d8eabe3d fit: init project hace 1 año
any_object.go 94d8eabe3d fit: init project hace 1 año
any_str.go 94d8eabe3d fit: init project hace 1 año
any_uint32.go 94d8eabe3d fit: init project hace 1 año
any_uint64.go 94d8eabe3d fit: init project hace 1 año
build.sh 94d8eabe3d fit: init project hace 1 año
config.go 94d8eabe3d fit: init project hace 1 año
fuzzy_mode_convert_table.md 94d8eabe3d fit: init project hace 1 año
iter.go 94d8eabe3d fit: init project hace 1 año
iter_array.go 94d8eabe3d fit: init project hace 1 año
iter_float.go 94d8eabe3d fit: init project hace 1 año
iter_int.go 94d8eabe3d fit: init project hace 1 año
iter_object.go 94d8eabe3d fit: init project hace 1 año
iter_skip.go 94d8eabe3d fit: init project hace 1 año
iter_skip_sloppy.go 94d8eabe3d fit: init project hace 1 año
iter_skip_strict.go 94d8eabe3d fit: init project hace 1 año
iter_str.go 94d8eabe3d fit: init project hace 1 año
jsoniter.go 94d8eabe3d fit: init project hace 1 año
pool.go 94d8eabe3d fit: init project hace 1 año
reflect.go 94d8eabe3d fit: init project hace 1 año
reflect_array.go 94d8eabe3d fit: init project hace 1 año
reflect_dynamic.go 94d8eabe3d fit: init project hace 1 año
reflect_extension.go 94d8eabe3d fit: init project hace 1 año
reflect_json_number.go 94d8eabe3d fit: init project hace 1 año
reflect_json_raw_message.go 94d8eabe3d fit: init project hace 1 año
reflect_map.go 94d8eabe3d fit: init project hace 1 año
reflect_marshaler.go 94d8eabe3d fit: init project hace 1 año
reflect_native.go 94d8eabe3d fit: init project hace 1 año
reflect_optional.go 94d8eabe3d fit: init project hace 1 año
reflect_slice.go 94d8eabe3d fit: init project hace 1 año
reflect_struct_decoder.go 94d8eabe3d fit: init project hace 1 año
reflect_struct_encoder.go 94d8eabe3d fit: init project hace 1 año
stream.go 94d8eabe3d fit: init project hace 1 año
stream_float.go 94d8eabe3d fit: init project hace 1 año
stream_int.go 94d8eabe3d fit: init project hace 1 año
stream_str.go 94d8eabe3d fit: init project hace 1 año
test.sh 94d8eabe3d fit: init project hace 1 año

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