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

We are trying to use this library for a use case where we need to iterate over nested types/json objects. We couldn't find any example of how to do it....

``` func Test_customize_map_key_encoder(t *testing.T) { should := require.New(t) cfg := jsoniter.Config{}.Froze() cfg.RegisterExtension(&testMapKeyExtension{}) m := map[int]int{1: 2} b, err := cfg.MarshalIndent(m, "", " ") should.NoError(err) should.Equal(`{ "2": 2 }`, string(b)) cfg...

We reuse iterator instances but not via Pools since we reuse them per thread. If the `iterator.Error` value is not cleared between usages, it will cause undefined parsing behavior as...

when using the Encode of the standard package, it adds a `\n` after every object, but when json-iterator gets it as an input, it fails, see code for an example:...

``` func TestJson(t *testing.T) { type info struct { Id int64 `json:"id"` } type test struct { Result []info `json:"result"` } r := `{"result":[{"id":"1"},{"id":"2"}]}` var res1 test var res2 test...

I ran into an issue when trying to custom unmarshal a struct when the fuzzy decoder is registered. Scenario is that an element in the json can either be a...

My use case was to read a base64 encoded file of unknown size, inside a JSON document that was sent via a webhook. I wanted to read it as a...

# Description jsoniter behaves differently from standard library in unmarshaling `null` value into `json.RawMessage`. This PR tries to fix the issue #469. # Changes - jsoniter will decode `null` into...

What‘s the difference on parsing result when facing incorrect JSON string between sloppy mode and strict mode?

Returning `string([]byte)` escapes to heap Cast to string by receiver, if needed