gojay

high performance JSON encoder/decoder with stream API for Golang
git clone git://git.lair.cx/gojay
Log | Files | Refs | README | LICENSE

commit 31f4f35e6f6f15381ce914677fb90968d748668a
parent 86e4b630f45da3bb0aa8ff9efa4b73ba416a5da8
Author: Francois Parquet <francois.parquet@gmail.com>
Date:   Sat, 28 Apr 2018 22:43:57 +0800

Merge pull request #9 from gudvinr/feature/readme-fix

Fix critical error in README.md
Diffstat:
MREADME.md | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -397,7 +397,7 @@ func main() { Unsafe API has the same functions than the regular API, it only has `Unmarshal API` for now. It is unsafe because it makes assumptions on the quality of the given JSON. -If you are not sure if you're JSON is valid, don't use the Unsafe API. +If you are not sure if your JSON is valid, don't use the Unsafe API. Also, the `Unsafe` API does not copy the buffer when using Unmarshal API, which, in case of string decoding, can lead to data corruption if a byte buffer is reused. Using the `Decode` API makes `Unsafe` API safer as the io.Reader relies on `copy` builtin method and `Decoder` will have its own internal buffer :)