Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 18-Oct-2020 | - | ||||
skip_tests/ | H | 18-Oct-2020 | - | |||
.codecov.yml | H A D | 18-Oct-2020 | 33 | 4 | 2 | |
.gitignore | H A D | 18-Oct-2020 | 33 | 4 | 3 | |
.travis.yml | H A D | 18-Oct-2020 | 151 | 14 | 9 | |
LICENSE | H A D | 18-Oct-2020 | 1 KiB | 22 | 17 | |
README.md | H A D | 18-Oct-2020 | 2.5 KiB | 81 | 56 | |
feature_adapter.go | H A D | 18-Oct-2020 | 3.7 KiB | 128 | 77 | |
feature_any.go | H A D | 18-Oct-2020 | 5.3 KiB | 243 | 209 | |
feature_any_array.go | H A D | 18-Oct-2020 | 4.7 KiB | 279 | 239 | |
feature_any_bool.go | H A D | 18-Oct-2020 | 1.8 KiB | 138 | 103 | |
feature_any_float.go | H A D | 18-Oct-2020 | 1.2 KiB | 84 | 65 | |
feature_any_int32.go | H A D | 18-Oct-2020 | 1.1 KiB | 75 | 56 | |
feature_any_int64.go | H A D | 18-Oct-2020 | 1.1 KiB | 75 | 56 | |
feature_any_invalid.go | H A D | 18-Oct-2020 | 1.3 KiB | 83 | 62 | |
feature_any_nil.go | H A D | 18-Oct-2020 | 916 | 70 | 52 | |
feature_any_number.go | H A D | 18-Oct-2020 | 2.1 KiB | 105 | 87 | |
feature_any_object.go | H A D | 18-Oct-2020 | 6.8 KiB | 375 | 311 | |
feature_any_string.go | H A D | 18-Oct-2020 | 2.8 KiB | 167 | 133 | |
feature_any_uint32.go | H A D | 18-Oct-2020 | 1.1 KiB | 75 | 56 | |
feature_any_uint64.go | H A D | 18-Oct-2020 | 1.1 KiB | 75 | 56 | |
feature_config.go | H A D | 18-Oct-2020 | 8.4 KiB | 313 | 261 | |
feature_iter.go | H A D | 18-Oct-2020 | 6.7 KiB | 308 | 262 | |
feature_iter_array.go | H A D | 18-Oct-2020 | 1.2 KiB | 59 | 54 | |
feature_iter_float.go | H A D | 18-Oct-2020 | 7.4 KiB | 342 | 314 | |
feature_iter_int.go | H A D | 18-Oct-2020 | 6.2 KiB | 259 | 230 | |
feature_iter_object.go | H A D | 18-Oct-2020 | 4.6 KiB | 213 | 200 | |
feature_iter_skip.go | H A D | 18-Oct-2020 | 3.1 KiB | 128 | 111 | |
feature_iter_skip_sloppy.go | H A D | 18-Oct-2020 | 2.9 KiB | 145 | 119 | |
feature_iter_skip_strict.go | H A D | 18-Oct-2020 | 1.8 KiB | 90 | 80 | |
feature_iter_string.go | H A D | 18-Oct-2020 | 4.6 KiB | 216 | 197 | |
feature_json_number.go | H A D | 18-Oct-2020 | 269 | 16 | 12 | |
feature_pool.go | H A D | 18-Oct-2020 | 1.1 KiB | 58 | 48 | |
feature_reflect.go | H A D | 18-Oct-2020 | 20.1 KiB | 692 | 627 | |
feature_reflect_array.go | H A D | 18-Oct-2020 | 2.6 KiB | 100 | 88 | |
feature_reflect_extension.go | H A D | 18-Oct-2020 | 11.8 KiB | 414 | 345 | |
feature_reflect_map.go | H A D | 18-Oct-2020 | 7.1 KiB | 245 | 220 | |
feature_reflect_native.go | H A D | 18-Oct-2020 | 17.1 KiB | 673 | 533 | |
feature_reflect_object.go | H A D | 18-Oct-2020 | 4.9 KiB | 197 | 179 | |
feature_reflect_slice.go | H A D | 18-Oct-2020 | 3.7 KiB | 150 | 132 | |
feature_reflect_struct_decoder.go | H A D | 18-Oct-2020 | 25.1 KiB | 917 | 888 | |
feature_stream.go | H A D | 18-Oct-2020 | 6.8 KiB | 306 | 242 | |
feature_stream_float.go | H A D | 18-Oct-2020 | 2.1 KiB | 97 | 83 | |
feature_stream_int.go | H A D | 18-Oct-2020 | 6.7 KiB | 321 | 296 | |
feature_stream_string.go | H A D | 18-Oct-2020 | 8.2 KiB | 397 | 352 | |
fuzzy_mode_convert_table.md | H A D | 18-Oct-2020 | 927 | 7 | 7 | |
jsoniter.go | H A D | 18-Oct-2020 | 884 | 19 | 1 | |
test.sh | H A D | 18-Oct-2020 | 247 | 13 | 9 |
README.md
1[![Sourcegraph](https://sourcegraph.com/github.com/json-iterator/go/-/badge.svg)](https://sourcegraph.com/github.com/json-iterator/go?badge) 2[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/json-iterator/go) 3[![Build Status](https://travis-ci.org/json-iterator/go.svg?branch=master)](https://travis-ci.org/json-iterator/go) 4[![codecov](https://codecov.io/gh/json-iterator/go/branch/master/graph/badge.svg)](https://codecov.io/gh/json-iterator/go) 5[![rcard](https://goreportcard.com/badge/github.com/json-iterator/go)](https://goreportcard.com/report/github.com/json-iterator/go) 6[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/json-iterator/go/master/LICENSE) 7[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/json-iterator/Lobby) 8 9A high-performance 100% compatible drop-in replacement of "encoding/json" 10 11``` 12Go开发者们请加入我们,滴滴出行平台技术部 taowen@didichuxing.com 13``` 14 15# Benchmark 16 17![benchmark](http://jsoniter.com/benchmarks/go-benchmark.png) 18 19Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/github.com/json-iterator/go-benchmark/benchmark_medium_payload_test.go 20 21Raw Result (easyjson requires static code generation) 22 23| | ns/op | allocation bytes | allocation times | 24| --- | --- | --- | --- | 25| std decode | 35510 ns/op | 1960 B/op | 99 allocs/op | 26| easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op | 27| jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op | 28| std encode | 2213 ns/op | 712 B/op | 5 allocs/op | 29| easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op | 30| jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op | 31 32# Usage 33 34100% compatibility with standard lib 35 36Replace 37 38```go 39import "encoding/json" 40json.Marshal(&data) 41``` 42 43with 44 45```go 46import "github.com/json-iterator/go" 47jsoniter.Marshal(&data) 48``` 49 50Replace 51 52```go 53import "encoding/json" 54json.Unmarshal(input, &data) 55``` 56 57with 58 59```go 60import "github.com/json-iterator/go" 61jsoniter.Unmarshal(input, &data) 62``` 63 64[More documentation](http://jsoniter.com/migrate-from-go-std.html) 65 66# How to get 67 68``` 69go get github.com/json-iterator/go 70``` 71 72# Contribution Welcomed ! 73 74Contributors 75 76* [thockin](https://github.com/thockin) 77* [mattn](https://github.com/mattn) 78* [cch123](https://github.com/cch123) 79 80Report issue or pull request, or email taowen@gmail.com, or [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/json-iterator/Lobby) 81