gorush/vendor/github.com/json-iterator/go
Bo-Yi Wu 6a64b42ab0 chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
..
LICENSE chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
README.md chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_adapter.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_array.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_bool.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_float.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_int32.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_int64.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_invalid.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_nil.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_number.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_object.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_string.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_uint32.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_any_uint64.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_config.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_iter.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_iter_array.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_iter_float.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_iter_int.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_iter_object.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_iter_skip.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_iter_string.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_pool.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect_array.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect_extension.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect_map.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect_native.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect_object.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect_slice.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_reflect_struct_decoder.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_stream.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_stream_float.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_stream_int.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
feature_stream_string.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
fuzzy_mode_convert_table.md chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
jsoniter.go chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00
test.sh chore(vendor): upgrade gin repo (#249) 2017-07-14 22:23:57 -05:00

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

Usage

100% compatibility with standard lib

Replace

import "encoding/json"
json.Marshal(&data)

with

import "github.com/json-iterator/go"
jsoniter.Marshal(&data)

Replace

import "encoding/json"
json.Unmarshal(input, &data)

with

import "github.com/json-iterator/go"
jsoniter.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