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

![image](https://github.com/json-iterator/go/assets/7898300/520bb596-fd87-4164-9a60-8e43a1fdc033) go version 1.17.2 json-iterator v1.1.12 Is this the same with #618 ?

go version go1.20.4 darwin/arm64 gomod: github.com/json-iterator/go v1.1.9 ` func main() { fn := func(args ...interface{}) (interface{}, error) { if len(args) == 0 { return nil, nil } var data map[string]interface{}...

Is their a way to dynamically omit or exclude a field from being output to json. To give you some context we work with structs and depending on the user...

According to the docs, it's possible to get 100% compatibility with the standard lib: > 100% compatibility with standard lib > > Replace > ```go import "encoding/json" json.Marshal(&data) ``` >...

json-iterator is using `append` in many places to grow a buffer, e.g.: https://github.com/json-iterator/go/blob/71ac16282d122fdd1e3a6d3e7f79b79b4cc3b50e/stream.go#L68 https://github.com/json-iterator/go/blob/71ac16282d122fdd1e3a6d3e7f79b79b4cc3b50e/stream_int.go#L29 As noted at https://github.com/golang/go/issues/50774, `append` is designed to minimize space wasted at the end of the...

```golang func Test_jsoniterMarshal(t *testing.T) { m := map[string]int{"c": 3, "a": 1, "b": 2} keys := make([]string, 0, len(m)) for key := range m { keys = append(keys, key) } sort.Strings(keys)...

Sorry, this may not be a very formal pr, as I'm working on [molon/jsoniterpb](https://github.com/molon/jsoniterpb). But completing it must require higher extensibility. I can only try to support it according to...

when use RegisterFuzzyDecoders, map bool to string failed, message 'not number or string' default while decode to 'true' or 'false'

Several functions missing. Like Compact/Indent/HTMLEscape/Decoder.Token etc.