Нет описания

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

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