Няма описание

Tao Wen 54dbcda64d #62 SkipAndReturnBytes should support reader преди 8 години
.idea b0c9f047e2 test more than one pakcage description преди 8 години
assert cfffa29c8a gofmt преди 8 години
output_tests 7480e41836 Add output tests for maps of builtins преди 8 години
require 101dfdbb2a fix 4 fields object decoding преди 9 години
LICENSE 923358c07e Initial commit преди 9 години
README.md d09e2419ba update benchmark преди 8 години
example_test.go 0195110b5b gofmt преди 8 години
feature_adapter.go 7a049ec79c #60 support read interface{} as json.Number преди 8 години
feature_any.go 55fc498d27 use iterator from cache for any преди 8 години
feature_any_array.go 2503ef17eb marshal lazy array/object using the config преди 8 години
feature_any_bool.go edb96991a8 add all integer types преди 8 години
feature_any_float.go 55fc498d27 use iterator from cache for any преди 8 години
feature_any_int32.go cfffa29c8a gofmt преди 8 години
feature_any_int64.go 0195110b5b gofmt преди 8 години
feature_any_invalid.go edb96991a8 add all integer types преди 8 години
feature_any_nil.go cfffa29c8a gofmt преди 8 години
feature_any_object.go 2503ef17eb marshal lazy array/object using the config преди 8 години
feature_any_string.go 55fc498d27 use iterator from cache for any преди 8 години
feature_any_uint32.go edb96991a8 add all integer types преди 8 години
feature_any_uint64.go 55fc498d27 use iterator from cache for any преди 8 години
feature_config.go 7a049ec79c #60 support read interface{} as json.Number преди 8 години
feature_iter.go 54dbcda64d #62 SkipAndReturnBytes should support reader преди 8 години
feature_iter_array.go cfffa29c8a gofmt преди 8 години
feature_iter_float.go d0418857ce #53 move current config EnableXXX преди 8 години
feature_iter_int.go cfffa29c8a gofmt преди 8 години
feature_iter_object.go 77dcffe77d tweak performance преди 8 години
feature_iter_skip.go 54dbcda64d #62 SkipAndReturnBytes should support reader преди 8 години
feature_iter_string.go 26708bccc9 report error when string end not found преди 8 години
feature_pool.go 77dcffe77d tweak performance преди 8 години
feature_reflect.go 69bc64b6d8 #54 support sort map keys преди 8 години
feature_reflect_array.go d867c8ba5c #53 split config into Config and frozenConfig преди 8 години
feature_reflect_map.go 0195110b5b gofmt преди 8 години
feature_reflect_native.go 3d5f6d3a4a #58 string mode support both encoding and decoding преди 8 години
feature_reflect_object.go 3d5f6d3a4a #58 string mode support both encoding and decoding преди 8 години
feature_stream.go 5f22e50c89 #53 support escapeHtml преди 8 години
feature_stream_float.go d0418857ce #53 move current config EnableXXX преди 8 години
feature_stream_int.go d0418857ce #53 move current config EnableXXX преди 8 години
feature_stream_string.go e0e2423e9a #53 test compatibility without html escape преди 8 години
jsoniter_adapter_test.go a6ea770365 #53 implement SetEscapeHtml преди 8 години
jsoniter_any_array_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_any_bool_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_any_float_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_any_int_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_any_map_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_any_null_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_any_object_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_any_string_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_array_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_bool_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_customize_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_demo_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_find_end_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_float_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_int_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_interface_test.go 7a049ec79c #60 support read interface{} as json.Number преди 8 години
jsoniter_io_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_iterator_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_large_file_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_map_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_nested_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_null_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_object_test.go 8ab46965bd extract out any tests преди 8 години
jsoniter_optional_test.go d0418857ce #53 move current config EnableXXX преди 8 години
jsoniter_reflect_native_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_skip_test.go 54dbcda64d #62 SkipAndReturnBytes should support reader преди 8 години
jsoniter_stream_test.go b31b1301e2 #59 add ConfigFastest преди 8 години
jsoniter_string_test.go 8ab46965bd extract out any tests преди 8 години

README.md

rcard

jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go

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)

How to get

go get github.com/json-iterator/go

Contribution Welcomed !

Report issue or pull request, or email taowen@gmail.com, or Gitter chat