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

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