설명 없음

Tao Wen e066e54964 #135 verify 1e1 and 1.0e1 is handled same as std 8 년 전
extra f0487718f6 document public symbols 8 년 전
output_tests ce479f3476 fix golint: document exported symbols 8 년 전
skip_tests f6da8e62c3 #133 validate json when Skip() 8 년 전
.codecov.yml b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
.gitignore f60a6a17c2 test and cover multiple packages 8 년 전
.travis.yml 6a7bf91c45 only test against 1.8 8 년 전
LICENSE 923358c07e Initial commit 9 년 전
README.md 8700644196 cut 0.9.18 8 년 전
example_test.go 9ecb1fd36d fix go vet 8 년 전
feature_adapter.go 3606750b83 document public symbols 8 년 전
feature_any.go 0187038bad check null/true/false 8 년 전
feature_any_array.go db3f5046d7 remove GetObject & GetArray from Any 8 년 전
feature_any_bool.go baca358b53 add MustBeValid to Any 8 년 전
feature_any_float.go 6129e85d53 increase coverage 8 년 전
feature_any_int32.go baca358b53 add MustBeValid to Any 8 년 전
feature_any_int64.go baca358b53 add MustBeValid to Any 8 년 전
feature_any_invalid.go db3f5046d7 remove GetObject & GetArray from Any 8 년 전
feature_any_nil.go baca358b53 add MustBeValid to Any 8 년 전
feature_any_number.go 712ddb1942 fix negative number to uint 8 년 전
feature_any_object.go bd4364ab7c #129 fix read map with reader, should use ReadMapCB instead of ReadObjectCB 8 년 전
feature_any_string.go 0d6dae80e1 Fix exponent parsing 8 년 전
feature_any_uint32.go baca358b53 add MustBeValid to Any 8 년 전
feature_any_uint64.go baca358b53 add MustBeValid to Any 8 년 전
feature_config.go f0487718f6 document public symbols 8 년 전
feature_iter.go f6da8e62c3 #133 validate json when Skip() 8 년 전
feature_iter_array.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
feature_iter_float.go 18d6ae2668 #135 fix leading zero 8 년 전
feature_iter_int.go f0487718f6 document public symbols 8 년 전
feature_iter_object.go f6da8e62c3 #133 validate json when Skip() 8 년 전
feature_iter_skip.go 18d6ae2668 #135 fix leading zero 8 년 전
feature_iter_skip_sloppy.go 5eded4f6ae implement skip number and string strictly 8 년 전
feature_iter_skip_strict.go f6da8e62c3 #133 validate json when Skip() 8 년 전
feature_iter_string.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
feature_pool.go f0487718f6 document public symbols 8 년 전
feature_reflect.go f0487718f6 document public symbols 8 년 전
feature_reflect_array.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
feature_reflect_extension.go 3606750b83 document public symbols 8 년 전
feature_reflect_map.go 845d8438db #126 fix space in case map key is sorted 8 년 전
feature_reflect_native.go 3a6ecf051c make receiver names consistent 8 년 전
feature_reflect_object.go 5862c51768 extract out feature_reflect_struct_decoder 8 년 전
feature_reflect_slice.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
feature_reflect_struct_decoder.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
feature_stream.go 6a4fbb9892 ensure buffer flushed to io.Writer 8 년 전
feature_stream_float.go bede1d7f40 fix build; add document for exported symbols 8 년 전
feature_stream_int.go bede1d7f40 fix build; add document for exported symbols 8 년 전
feature_stream_string.go bede1d7f40 fix build; add document for exported symbols 8 년 전
fuzzy_mode_convert_table.md 779c3e2164 update conversion table 8 년 전
jsoniter.go f0487718f6 document public symbols 8 년 전
jsoniter_1dot8_only_test.go f0487718f6 document public symbols 8 년 전
jsoniter_adapter_test.go 845d8438db #126 fix space in case map key is sorted 8 년 전
jsoniter_alias_test.go bede1d7f40 fix build; add document for exported symbols 8 년 전
jsoniter_any_array_test.go d336ee6da6 fix build 8 년 전
jsoniter_any_bool_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_any_float_test.go 0d6dae80e1 Fix exponent parsing 8 년 전
jsoniter_any_int_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_any_map_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_any_null_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_any_object_test.go d336ee6da6 fix build 8 년 전
jsoniter_any_string_test.go f6da8e62c3 #133 validate json when Skip() 8 년 전
jsoniter_array_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_bool_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_customize_test.go f0487718f6 document public symbols 8 년 전
jsoniter_demo_test.go 6d0e6f3733 fix go report card 8 년 전
jsoniter_encode_interface_test.go 93ce14316d increase coverage 8 년 전
jsoniter_fixed_array_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_float_test.go e066e54964 #135 verify 1e1 and 1.0e1 is handled same as std 8 년 전
jsoniter_int_test.go e07a4ca5ec add int/int8/int32/int64 overflow test 8 년 전
jsoniter_interface_test.go e066e54964 #135 verify 1e1 and 1.0e1 is handled same as std 8 년 전
jsoniter_invalid_test.go e066e54964 #135 verify 1e1 and 1.0e1 is handled same as std 8 년 전
jsoniter_io_test.go f6da8e62c3 #133 validate json when Skip() 8 년 전
jsoniter_iterator_test.go be9d4ded4f Use json.Number as the return 8 년 전
jsoniter_large_file_test.go b31b1301e2 #59 add ConfigFastest 8 년 전
jsoniter_map_test.go bd4364ab7c #129 fix read map with reader, should use ReadMapCB instead of ReadObjectCB 8 년 전
jsoniter_must_be_valid_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_nested_test.go 818ae1331a #68 number to string 8 년 전
jsoniter_null_test.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
jsoniter_object_test.go f6da8e62c3 #133 validate json when Skip() 8 년 전
jsoniter_optional_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_raw_message_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_reader_test.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
jsoniter_reflect_native_test.go b31b1301e2 #59 add ConfigFastest 8 년 전
jsoniter_skip_test.go 5eded4f6ae implement skip number and string strictly 8 년 전
jsoniter_sloppy_test.go 5eded4f6ae implement skip number and string strictly 8 년 전
jsoniter_stream_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
jsoniter_string_test.go 9b3ec40fd9 #133 fix empty struct skip; fix ] as empty array 8 년 전
jsoniter_wrap_test.go b74ffb2e03 import github.com/stretchr/testify/require 8 년 전
test.sh b46d0a2324 make test faster 8 년 전
unmarshal_input_test.go f6da8e62c3 #133 validate json when Skip() 8 년 전

README.md

Sourcegraph GoDoc Build Status codecov rcard License Gitter chat

A high-performance 100% compatible drop-in replacement of "encoding/json"

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)

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