forked from mirror/go-json
991c8c411b
Fix encoding of json.Number |
||
---|---|---|
.github/workflows | ||
benchmarks | ||
cmd/generator | ||
LICENSE | ||
README.md | ||
compact.go | ||
decode.go | ||
decode_array.go | ||
decode_bool.go | ||
decode_compile.go | ||
decode_context.go | ||
decode_float.go | ||
decode_int.go | ||
decode_interface.go | ||
decode_map.go | ||
decode_number.go | ||
decode_ptr.go | ||
decode_slice.go | ||
decode_stream.go | ||
decode_string.go | ||
decode_struct.go | ||
decode_test.go | ||
decode_uint.go | ||
decode_unmarshal_json.go | ||
decode_unmarshal_text.go | ||
decode_wrapped_string.go | ||
encode.go | ||
encode_compile.go | ||
encode_map112.go | ||
encode_map113.go | ||
encode_opcode.go | ||
encode_optype.go | ||
encode_string.go | ||
encode_test.go | ||
encode_vm.go | ||
error.go | ||
export_test.go | ||
go.mod | ||
go.sum | ||
helper_test.go | ||
indent.go | ||
json.go | ||
json_test.go | ||
rtype.go | ||
struct_field.go |
README.md
go-json
Fast JSON encoder/decoder compatible with encoding/json for Go
Installation
go get github.com/goccy/go-json
How to use
Replace import statement from encoding/json
to github.com/goccy/go-json
-import "encoding/json"
+import "github.com/goccy/go-json"
Benchmarks
$ cd benchmarks
$ go test -bench .
Encode
Fastest
SmallStruct
MediumStruct
LargeStruct
Decode
So faster than json-iterator/go
json.Unmarshal
SmallStruct
MediumStruct
LargeStruct
Stream Decode
SmallStruct
MediumStruct
LargeStruct
Status
Type
Currently supported all types
API
Implements All APIs
Error
InvalidUTF8Error
InvalidUnmarshalError
MarshalerError
SyntaxError
UnmarshalFieldError
UnmarshalTypeError
UnsupportedTypeError
UnsupportedValueError
License
MIT