go icon indicating copy to clipboard operation
go copied to clipboard

A high-performance 100% compatible drop-in replacement of "encoding/json"

Results 188 go issues
Sort by recently updated
recently updated
newest added

Replaced slices with arrays at places in code that matched all 3 criteria: 1. length is fixed (doesn't need to change throughout the lifecycle of the program) 2. length is...

Trying to get an `omitempty` behavior for all fields of a bunch of third party well nested structs. getting empty values instead. ```go type omitemptyExtension struct { jsoniter.DummyExtension } type...

**ignore json tag `omitempty`, can output empty field** ```go // OmitDefaultExtension 忽略json tag的omitempty type OmitDefaultExtension struct { jsoniter.DummyExtension } // DecorateEncoder 修饰编码器 func (extension *OmitDefaultExtension) DecorateEncoder(typ reflect2.Type, encoder jsoniter.ValEncoder) jsoniter.ValEncoder...

**environ** os: Mac OSX Big Sur 11.3.1 go version go1.14.15 darwin/amd64 jsoniter version `github.com/json-iterator/go v1.1.12` **test case** ```go package json_test import ( "encoding/json" "fmt" jsoniter "github.com/json-iterator/go" "testing" ) type M...

Try unmarshal nil RawMessage to a slice, v1.1.10 is ok, but v1.1.11 will return error. POC: ```Go package main import ( "fmt" "github.com/json-iterator/go" ) type commonResponse struct { Code int...

```go package main import ( "encoding/json" "fmt" jsoniter "github.com/json-iterator/go" ) func main() { type A struct { Rm jsoniter.RawMessage } a := A{} b, e := jsoniter.Marshal(a) fmt.Println("jsoniter: ",b, e)...

For an application like OpenRTB, where memory reuse is important, the `ReadStringAsSlice` comes in handy. But, unfortunately, it does not unescape strings and it doesn't have check for null as...

Draft, PoC, PR of how a solution to #573 could look like. I made some other non-related changes too which would need to be submitted in other PRs and removed...

Hi, thanks for this nice project! It would be really nice if this project would return errors (exactly or wrapping) e.g. [`json.UnmarshalTypeError`](https://pkg.go.dev/encoding/json#UnmarshalTypeError) or [`json.SyntaxError`](https://pkg.go.dev/encoding/json#SyntaxError), for even more compatibility with the...