http urls monitor.
haiswork da96f3196f init il y a 5 ans
..
.codecov.yml init il y a 5 ans
.gitignore init il y a 5 ans
.travis.yml init il y a 5 ans
Gopkg.lock init il y a 5 ans
Gopkg.toml init il y a 5 ans
LICENSE init il y a 5 ans
README.md init il y a 5 ans
adapter.go init il y a 5 ans
any.go init il y a 5 ans
any_array.go init il y a 5 ans
any_bool.go init il y a 5 ans
any_float.go init il y a 5 ans
any_int32.go init il y a 5 ans
any_int64.go init il y a 5 ans
any_invalid.go init il y a 5 ans
any_nil.go init il y a 5 ans
any_number.go init il y a 5 ans
any_object.go init il y a 5 ans
any_str.go init il y a 5 ans
any_uint32.go init il y a 5 ans
any_uint64.go init il y a 5 ans
build.sh init il y a 5 ans
config.go init il y a 5 ans
fuzzy_mode_convert_table.md init il y a 5 ans
iter.go init il y a 5 ans
iter_array.go init il y a 5 ans
iter_float.go init il y a 5 ans
iter_int.go init il y a 5 ans
iter_object.go init il y a 5 ans
iter_skip.go init il y a 5 ans
iter_skip_sloppy.go init il y a 5 ans
iter_skip_strict.go init il y a 5 ans
iter_str.go init il y a 5 ans
jsoniter.go init il y a 5 ans
pool.go init il y a 5 ans
reflect.go init il y a 5 ans
reflect_array.go init il y a 5 ans
reflect_dynamic.go init il y a 5 ans
reflect_extension.go init il y a 5 ans
reflect_json_number.go init il y a 5 ans
reflect_json_raw_message.go init il y a 5 ans
reflect_map.go init il y a 5 ans
reflect_marshaler.go init il y a 5 ans
reflect_native.go init il y a 5 ans
reflect_optional.go init il y a 5 ans
reflect_slice.go init il y a 5 ans
reflect_struct_decoder.go init il y a 5 ans
reflect_struct_encoder.go init il y a 5 ans
stream.go init il y a 5 ans
stream_float.go init il y a 5 ans
stream_int.go init il y a 5 ans
stream_str.go init il y a 5 ans
test.sh init il y a 5 ans

README.md

Sourcegraph GoDoc Build Status codecov rcard License Gitter chat

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

You can also use thrift like JSON using thrift-iterator

Go开发者们请加入我们,滴滴出行平台技术部 taowen@didichuxing.com

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

var json = jsoniter.ConfigCompatibleWithStandardLibrary
json.Marshal(&data)

Replace

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

with

import "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