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

If there is an implementation of `MarshalJSON` for a type and the receiver is a pointer, then `omitempty` tag will be ignored by `jsoniterator.Marshal` even if the field of that...

When serializing a map, Is there a way to ignore zero values ​​in map? I don't want zero values ​​inside map example: ``` func TestMarshal(t *testing.T) { m := map[string]interface{}{...

Test Code: ``` package tests import ( "fmt" "testing" jsoniter "github.com/json-iterator/go" ) var json2 = jsoniter.ConfigDefault type Node struct { Name string `json:"name"` Next *Node `json:"next"` } func TestJson2(t *testing.T)...

Related to #570 As can be read in [YAML 1.2 spec](https://yaml.org/spec/1.2/) : > JSON's RFC4627 requires that mappings keys merely “SHOULD” be unique, while YAML insists they “MUST” be. Technically,...

Hi! Nice lib, thanks! I'm working on OOMs here https://github.com/wal-g/wal-g/issues/738 And we need to serialize object to network stream without allocating buffer for all json representation. And we do not...

func TestMarshal(t *testing.T) { m := make(map[string]string) m["a"] = "sss&aaa" s, _ := jsoniter.Marshal(m) fmt.Println(string(s)) } //output === RUN TestMarshal unexpected fault address 0x0 fatal error: fault [signal SIGSEGV: segmentation...

https://github.com/json-iterator/go/pull/386 This pull request was colsed, I think it's very useful, could someone provide an official support?

subStream fork not inherit indention field, may be this place has a same bug... https://github.com/json-iterator/go/blob/024077e996b048517130b21ea6bf12aa23055d3d/reflect_struct_encoder.go#L201-L207

I have a valid JSON object. ``` { "id": "2489657257", "type": "PushEvent", "actor": { "id": 3170981, "login": "kulmala", "gravatar_id": "", "url": "https://api.github.com/users/kulmala", "avatar_url": "https://avatars.githubusercontent.com/u/3170981?" }, "repo": { "id": 23549741, "name":...