Fast JSON encoder/decoder compatible with encoding/json for Go
Go to file
Masaaki Goshima d2de9a1eb5 Refactor 2021-02-09 09:23:15 +09:00
.github/workflows remove go vet 2021-02-08 14:14:28 +09:00
benchmarks Add benchmark for streaming encoding 2021-01-31 23:01:39 +09:00
cmd/generator Remove InterfaceEnd operation 2021-01-24 23:04:54 +09:00
.codecov.yml Add codecov.yml 2021-02-01 12:05:28 +09:00
.gitignore Refactor file layout for coverage 2021-01-16 22:16:26 +09:00
.golangci.yml Add disable rule 2021-02-03 23:43:22 +09:00
LICENSE Initial commit 2020-04-19 18:32:37 +09:00
Makefile Fix Makefile 2021-02-03 23:43:14 +09:00
README.md Update README.md 2021-02-08 18:30:27 +09:00
codec.go Optimize getting of cached decoder 2021-02-04 18:00:08 +09:00
codecov.yaml Add codecov.yaml 2020-12-30 20:15:04 +09:00
compact.go Fix MarshalJSON/MarshalText 2020-08-18 13:36:36 +09:00
cover_float32_test.go Add test cases for float32/float64 type 2021-01-19 20:41:14 +09:00
cover_float64_test.go Add test cases for float32/float64 type 2021-01-19 20:41:14 +09:00
cover_helper_test.go Add compatible test 2021-01-19 14:01:43 +09:00
cover_int8_test.go Add compatible test 2021-01-19 14:01:43 +09:00
cover_int16_test.go Add compatible test 2021-01-19 14:01:43 +09:00
cover_int32_test.go Add compatible test 2021-01-19 14:01:43 +09:00
cover_int64_test.go Add compatible test 2021-01-19 14:01:43 +09:00
cover_int_test.go Add compatible test 2021-01-19 14:01:43 +09:00
cover_string_test.go Add StructFieldOmitEmptyStringPtr 2021-01-22 18:19:54 +09:00
cover_uint8_test.go Add test cases for unsigned integer types 2021-01-19 14:54:27 +09:00
cover_uint16_test.go Add test cases for unsigned integer types 2021-01-19 14:54:27 +09:00
cover_uint32_test.go Add test cases for unsigned integer types 2021-01-19 14:54:27 +09:00
cover_uint64_test.go Add test cases for unsigned integer types 2021-01-19 14:54:27 +09:00
cover_uint_test.go Add test cases for unsigned integer types 2021-01-19 14:54:27 +09:00
decode.go Optimize getting of cached decoder 2021-02-04 18:00:08 +09:00
decode_anonymous_field.go Remove debug log 2020-12-24 18:45:04 +09:00
decode_array.go Fix array decoder 2020-12-24 23:14:58 +09:00
decode_bool.go Fix error case 2020-12-24 18:30:11 +09:00
decode_bytes.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
decode_compile.go Fix algorithm of struct field detection 2021-02-06 20:07:01 +09:00
decode_compile_norace.go Optimize getting of cached decoder 2021-02-04 18:00:08 +09:00
decode_compile_race.go Optimize getting of cached decoder 2021-02-04 18:00:08 +09:00
decode_context.go Enable Boundary Check Elimination by pointer arithmetic 2021-02-06 01:09:24 +09:00
decode_float.go Fix streaming decoder for float value 2020-12-27 20:42:43 +09:00
decode_int.go Enable Boundary Check Elimination by pointer arithmetic 2021-02-06 01:09:24 +09:00
decode_interface.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
decode_map.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
decode_number.go Fix stream decoding 2020-12-05 22:27:33 +09:00
decode_ptr.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
decode_slice.go Refactor by linter 2021-02-03 23:50:02 +09:00
decode_stream.go Refactor isWhiteSpace at streaming decoding 2021-02-06 20:08:18 +09:00
decode_string.go optimize unnecessary copy 2021-02-06 17:41:51 +09:00
decode_struct.go Fix error by linter 2021-02-06 22:17:24 +09:00
decode_test.go Fix decoding of escape char at UnmarshalJSON 2021-01-30 02:03:31 +09:00
decode_uint.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
decode_unmarshal_json.go Copy buffer to decode of UnmarshalJSON 2021-01-22 14:01:01 +09:00
decode_unmarshal_text.go Add error handling for unmarshal text 2020-12-24 18:45:26 +09:00
decode_wrapped_string.go Fix overflow handling for int/uint decoder 2020-12-21 15:48:57 +09:00
encode.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
encode_compile.go Refactor 2021-02-09 09:23:15 +09:00
encode_compile_norace.go Fix error by race detector 2021-02-01 20:02:43 +09:00
encode_compile_race.go Fix error by race detector 2021-02-01 20:02:43 +09:00
encode_context.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
encode_int.go Replace int/uint encoding implementation 2020-12-20 04:02:03 +09:00
encode_map112.go Fix build 2020-04-26 12:49:54 +09:00
encode_map113.go Fix build 2020-04-26 12:49:54 +09:00
encode_opcode.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
encode_opcode_test.go Add test code 2021-02-01 22:34:53 +09:00
encode_optype.go Remove InterfaceEnd operation 2021-01-24 23:04:54 +09:00
encode_string.go Refactor by linter 2021-02-03 23:50:02 +09:00
encode_test.go Fix encoding of anonymous struct 2021-02-09 09:20:48 +09:00
encode_vm.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
encode_vm_escaped.go Merge pull request #111 from goccy/feature/fix-lint 2021-02-01 22:48:56 +09:00
encode_vm_escaped_indent.go Fix error message 2021-02-01 12:01:56 +09:00
encode_vm_indent.go Fix error message 2021-02-01 12:01:56 +09:00
error.go Fix error case 2020-12-24 18:30:11 +09:00
example_marshaling_test.go Add examples 2020-08-27 21:02:44 +09:00
example_test.go Omit map example because currently cannot sort map by keys 2020-08-27 21:13:36 +09:00
example_text_marshaling_test.go Fix pointer fields 2020-09-17 21:50:27 +09:00
export_test.go Add test cases for MarshalJSON and MarshalText 2020-08-19 00:32:45 +09:00
go.mod Removed dependency on xerrors 2020-05-09 01:49:37 +09:00
go.sum Removed dependency on xerrors 2020-05-09 01:49:37 +09:00
helper_test.go Fix null value for struct field 2020-08-08 13:20:42 +09:00
indent.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
json.go Fix MarshalNoEscape 2021-01-31 22:53:01 +09:00
json_test.go Omit Parallel execution of test case 2020-12-24 20:38:42 +09:00
number_test.go Add test cases 2020-08-25 00:56:23 +09:00
option.go Refactor encoder 2021-01-31 22:45:59 +09:00
rtype.go Fix MarshalJSON/MarshalText 2020-08-18 13:36:36 +09:00
stream_test.go Fix streaming decoder for float value 2020-12-27 20:42:43 +09:00
struct_field.go Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
tagkey_test.go Fix test case 2020-09-17 10:53:39 +09:00

README.md

go-json

Go GoDoc codecov

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"

JSON library comparison

name encoder decoder compatible with encoding/json
encoding/json N/A
json-iterator/go
easyjson
gojay
segmentio/encoding/json
jettison
simdjson-go
go-json
  • json-iterator/go isn't compatible with encoding/json in many ways, but it hasn't been supported for a long time.

Benchmarks

$ cd benchmarks
$ go test -bench .

Encode

Decode

License

MIT