go
go copied to clipboard
A high-performance 100% compatible drop-in replacement of "encoding/json"
Added CONTRIBUTING.md ----> Briefly Explain about the Contribution & added Contributers Profiles
follow code cause stack overflow ```go import ( "fmt" jsoniter "github.com/json-iterator/go" "testing" ) type A struct { B *B `json:"b"` } type B struct { A *A `json:"a"` } func...
The following code runs fine in the original package, but panics after replacing it with jsoniter: ```go func() { // resp is the structure generated by protobuf // Return json...
I filed this as a Go bug since it is architecture-specific, but cross-posting here for visibility: https://github.com/golang/go/issues/71408 This code: ``` type Metadata struct { Type string `json:"type"` } func TestJsonIter(t...
Strings with escape characters are not properly parsed in `ReadStringAsSlice()`
PR based on [https://go.dev/blog/testing-b-loop](url) for Go 1.24.
See the code in any_object.go ```go func (any *objectLazyAny) ToVal(obj interface{}) { iter := any.cfg.BorrowIterator(any.buf) defer any.cfg.ReturnIterator(iter) iter.ReadVal(obj) } ``` When `iter.ReadVal(obj)` failed, the error did not propagate to the...
# Context The [last update](https://github.com/json-iterator/go/pull/635#issue-1374599618) in this repo dates back 2+ years ago (Sep 16, 2022). The `encoding/json` library has evolved (slightly yet) e.g. https://go.dev/doc/go1.22#minor_library_changes (see [this code snippet](https://play.golang.com/p/tWBl9hOt9HI)), and...
Now the bufSize is 512. bytes.makeSlice will happen when the json size is larger than bufSize. If most of my json are larger than 512, I want to set it...