Aucune description

Tao Wen 787edc95b0 Revert "WIP: Tests to compare against stdlib" il y a 7 ans
.idea b0c9f047e2 test more than one pakcage description il y a 7 ans
assert cfffa29c8a gofmt il y a 7 ans
require 101dfdbb2a fix 4 fields object decoding il y a 7 ans
LICENSE 923358c07e Initial commit il y a 7 ans
README.md d09e2419ba update benchmark il y a 7 ans
example_test.go 962c470806 fix import not use il y a 7 ans
feature_adapter.go cee09816e3 decoder/encoder;float precision doc il y a 7 ans
feature_any.go 53f8d370b5 fix wrap any il y a 7 ans
feature_any_array.go cfffa29c8a gofmt il y a 7 ans
feature_any_bool.go edb96991a8 add all integer types il y a 7 ans
feature_any_float.go cfffa29c8a gofmt il y a 7 ans
feature_any_int32.go cfffa29c8a gofmt il y a 7 ans
feature_any_int64.go cfffa29c8a gofmt il y a 7 ans
feature_any_invalid.go edb96991a8 add all integer types il y a 7 ans
feature_any_nil.go cfffa29c8a gofmt il y a 7 ans
feature_any_object.go cfffa29c8a gofmt il y a 7 ans
feature_any_string.go cfffa29c8a gofmt il y a 7 ans
feature_any_uint32.go edb96991a8 add all integer types il y a 7 ans
feature_any_uint64.go cfffa29c8a gofmt il y a 7 ans
feature_iter.go cdbad22d22 test more package description il y a 7 ans
feature_iter_array.go cfffa29c8a gofmt il y a 7 ans
feature_iter_float.go cfffa29c8a gofmt il y a 7 ans
feature_iter_int.go cfffa29c8a gofmt il y a 7 ans
feature_iter_object.go 3307ce3ba2 #50 map key unlike object field, can contain escaped char il y a 7 ans
feature_iter_skip.go cfffa29c8a gofmt il y a 7 ans
feature_iter_string.go 26708bccc9 report error when string end not found il y a 7 ans
feature_reflect.go 6f50f15678 decoder/encoder;float precision doc il y a 7 ans
feature_reflect_array.go cfffa29c8a gofmt il y a 7 ans
feature_reflect_map.go 3307ce3ba2 #50 map key unlike object field, can contain escaped char il y a 7 ans
feature_reflect_native.go 84ad508437 #48 should return error if concrete tpye unknown il y a 7 ans
feature_reflect_object.go cfffa29c8a gofmt il y a 7 ans
feature_stream.go cfffa29c8a gofmt il y a 7 ans
feature_stream_float.go cee09816e3 decoder/encoder;float precision doc il y a 7 ans
feature_stream_int.go cfffa29c8a gofmt il y a 7 ans
jsoniter_adapter_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_array_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_base64_test.go d63a00f0bf Formated, doced. Also fixed few minor bugs. il y a 7 ans
jsoniter_bool_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_customize_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_demo_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_find_end_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_float_test.go d75b539bad add test for scientific float il y a 7 ans
jsoniter_int_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_interface_test.go 84ad508437 #48 should return error if concrete tpye unknown il y a 7 ans
jsoniter_io_test.go d63a00f0bf Formated, doced. Also fixed few minor bugs. il y a 7 ans
jsoniter_large_file_test.go d63a00f0bf Formated, doced. Also fixed few minor bugs. il y a 7 ans
jsoniter_map_test.go 3307ce3ba2 #50 map key unlike object field, can contain escaped char il y a 7 ans
jsoniter_nested_test.go d63a00f0bf Formated, doced. Also fixed few minor bugs. il y a 7 ans
jsoniter_null_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_object_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_optional_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_reflect_native_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_reflect_struct_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_reflect_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_skip_test.go d63a00f0bf Formated, doced. Also fixed few minor bugs. il y a 7 ans
jsoniter_stream_test.go cfffa29c8a gofmt il y a 7 ans
jsoniter_string_test.go 84ad508437 #48 should return error if concrete tpye unknown il y a 7 ans

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