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
* Requies extra care to work with - references to certain objects recursively
39
-
returned by [Parser](https://godoc.org/github.com/valyala/fastjson#Parser)
40
-
must be released before the next call to [Parse](https://godoc.org/github.com/valyala/fastjson#Parser.Parse).
41
-
Otherwise the program may work improperly. The same applies to objects returned by [Arena](https://godoc.org/github.com/valyala/fastjson#Arena).
42
-
Adhere recommendations from [docs](https://godoc.org/github.com/valyala/fastjson).
43
-
* Cannot parse JSON from `io.Reader`. There is [Scanner](https://godoc.org/github.com/valyala/fastjson#Scanner)
39
+
returned by [Parser](https://godoc.org/github.com/aperturerobotics/fastjson#Parser)
40
+
must be released before the next call to [Parse](https://godoc.org/github.com/aperturerobotics/fastjson#Parser.Parse).
41
+
Otherwise the program may work improperly. The same applies to objects returned by [Arena](https://godoc.org/github.com/aperturerobotics/fastjson#Arena).
42
+
Adhere recommendations from [docs](https://godoc.org/github.com/aperturerobotics/fastjson).
43
+
* Cannot parse JSON from `io.Reader`. There is [Scanner](https://godoc.org/github.com/aperturerobotics/fastjson#Scanner)
44
44
for parsing stream of JSON values from a string.
45
45
46
46
@@ -82,7 +82,7 @@ Accessing multiple fields with error handling:
82
82
// arr.1=foo
83
83
```
84
84
85
-
See also [examples](https://godoc.org/github.com/valyala/fastjson#pkg-examples).
85
+
See also [examples](https://godoc.org/github.com/aperturerobotics/fastjson#pkg-examples).
86
86
87
87
88
88
## Security
@@ -96,139 +96,15 @@ See also [examples](https://godoc.org/github.com/valyala/fastjson#pkg-examples).
96
96
97
97
## Performance optimization tips
98
98
99
-
* Re-use [Parser](https://godoc.org/github.com/valyala/fastjson#Parser) and [Scanner](https://godoc.org/github.com/valyala/fastjson#Scanner)
99
+
* Re-use [Parser](https://godoc.org/github.com/aperturerobotics/fastjson#Parser) and [Scanner](https://godoc.org/github.com/aperturerobotics/fastjson#Scanner)
100
100
for parsing many JSONs. This reduces memory allocations overhead.
101
-
[ParserPool](https://godoc.org/github.com/valyala/fastjson#ParserPool) may be useful in this case.
102
-
* Prefer calling `Value.Get*` on the value returned from [Parser](https://godoc.org/github.com/valyala/fastjson#Parser)
101
+
[ParserPool](https://godoc.org/github.com/aperturerobotics/fastjson#ParserPool) may be useful in this case.
102
+
* Prefer calling `Value.Get*` on the value returned from [Parser](https://godoc.org/github.com/aperturerobotics/fastjson#Parser)
103
103
instead of calling `Get*` one-liners when multiple fields
104
104
must be obtained from JSON, since each `Get*` one-liner re-parses
105
105
the input JSON again.
106
-
* Prefer calling once [Value.Get](https://godoc.org/github.com/valyala/fastjson#Value.Get)
106
+
* Prefer calling once [Value.Get](https://godoc.org/github.com/aperturerobotics/fastjson#Value.Get)
107
107
for common prefix paths and then calling `Value.Get*` on the returned value
108
108
for distinct suffix paths.
109
-
* Prefer iterating over array returned from [Value.GetArray](https://godoc.org/github.com/valyala/fastjson#Object.Visit)
109
+
* Prefer iterating over array returned from [Value.GetArray](https://godoc.org/github.com/aperturerobotics/fastjson#Object.Visit)
110
110
with a range loop instead of calling `Value.Get*` for each array item.
111
-
112
-
## Fuzzing
113
-
Install [go-fuzz](https://github.com/dvyukov/go-fuzz) & optionally the go-fuzz-corpus.
114
-
115
-
```bash
116
-
go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
117
-
```
118
-
119
-
Build using `go-fuzz-build` and run `go-fuzz` with an optional corpus.
0 commit comments