You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fast JSON encoder/decoder compatible with encoding/json for Go
@@ -22,12 +33,12 @@ Fast JSON encoder/decoder compatible with encoding/json for Go
22
33
```
23
34
24
35
We are accepting requests for features that will be implemented between v0.9.0 and v.1.0.0.
25
-
If you have the API you need, please submit your issue [here](https://github.com/goccy/go-json/issues).
36
+
If you have the API you need, please submit your issue [here](https://github.com/bytedance/sonic/issues).
26
37
27
38
# Features
28
39
29
40
- Drop-in replacement of `encoding/json`
30
-
- Fast ( See [Benchmark section](https://github.com/goccy/go-json#benchmarks) )
41
+
- Fast ( See [Benchmark section](https://github.com/bytedance/sonic#benchmarks) )
31
42
- Flexible customization with options
32
43
- Coloring the encoded string
33
44
- Can propagate context.Context to `MarshalJSON` or `UnmarshalJSON`
@@ -36,16 +47,16 @@ If you have the API you need, please submit your issue [here](https://github.com
36
47
# Installation
37
48
38
49
```
39
-
go get github.com/goccy/go-json
50
+
go get github.com/bytedance/sonic
40
51
```
41
52
42
53
# How to use
43
54
44
-
Replace import statement from `encoding/json` to `github.com/goccy/go-json`
55
+
Replace import statement from `encoding/json` to `github.com/bytedance/sonic`
45
56
46
57
```
47
58
-import "encoding/json"
48
-
+import "github.com/goccy/go-json"
59
+
+import "github.com/bytedance/sonic"
49
60
```
50
61
51
62
# JSON library comparison
@@ -98,8 +109,8 @@ $ go test -bench .
98
109
99
110
# Fuzzing
100
111
101
-
[go-json-fuzz](https://github.com/goccy/go-json-fuzz) is the repository for fuzzing tests.
102
-
If you run the test in this repository and find a bug, please commit to corpus to go-json-fuzz and report the issue to [go-json](https://github.com/goccy/go-json/issues).
112
+
[go-json-fuzz](https://github.com/bytedance/sonic-fuzz) is the repository for fuzzing tests.
113
+
If you run the test in this repository and find a bug, please commit to corpus to go-json-fuzz and report the issue to [go-json](https://github.com/bytedance/sonic/issues).
103
114
104
115
# How it works
105
116
@@ -192,7 +203,7 @@ For this reason, to date `reflect.Type` is the same as `*reflect.rtype`.
192
203
193
204
Therefore, by directly handling `*reflect.rtype`, which is an implementation of `reflect.Type`, it is possible to avoid escaping because it changes from `interface` to using `struct`.
194
205
195
-
The technique for working with `*reflect.rtype` directly from `go-json` is implemented at [rtype.go](https://github.com/goccy/go-json/blob/master/internal/runtime/rtype.go)
206
+
The technique for working with `*reflect.rtype` directly from `go-json` is implemented at [rtype.go](https://github.com/bytedance/sonic/blob/master/internal/runtime/rtype.go)
196
207
197
208
Also, the same technique is cut out as a library ( https://github.com/goccy/go-reflect )
198
209
@@ -353,7 +364,7 @@ However, if there is too much type information, it will use a lot of memory, so
353
364
354
365
If this approach is not available, it will fall back to the `atomic` based process described above.
355
366
356
-
If you want to know more, please refer to the implementation [here](https://github.com/goccy/go-json/blob/master/internal/runtime/type.go#L36-L100)
367
+
If you want to know more, please refer to the implementation [here](https://github.com/bytedance/sonic/blob/master/internal/runtime/type.go#L36-L100)
0 commit comments