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

Hey, Thanks for writing this amazing library, I'm having a small thought about some allocation. `Stream.Write` appends to `stream.buf` even if `stream.out` is not nil, making it allocate (sometimes) extra...

- make it return 0 when fuzzy decoding empty string to float32/float64

This my code : ``` //TickerEth Charts type TickerEth struct { Tickers []byte `json:"ticker"` } //Chart Realtime func Chart(pair string) []byte { ticker, error := request.Get("https://indodax.com/api/ticker/" + pair) if error...

https://github.com/json-iterator/go/blob/e6b9536d3649bda3e8842bb7e4fab489d79a97ea/reflect_extension.go#L348-L375 ``` func TestAnonymous(t *testing.T) { type Body struct { Content string `json:"content"` } type Wrapper struct { *Body Other string `json:"other"` } jsoniter.RegisterTypeEncoderFunc("Body", func(ptr unsafe.Pointer, stream *jsoniter.Stream) { stream.WriteObjectStart()...

#### version - go version go1.16.7 windows/amd64 - github.com/json-iterator/go v1.1.12 - github.com/stretchr/testify v1.3.0 #### code to reproduce this issue ```go package main import ( "bytes" "encoding/json" ejson "encoding/json" "testing" jsoniter...

have error used go 1.19 ![image](https://user-images.githubusercontent.com/23031644/186100203-4edf953e-9772-4961-9c21-456051a17307.png) it is ok when used go 1.17

Clean up zero and convert float as if by ES6 number to string conversion: - Clean up example: `e-09` to `e-9` - More detailed reference [std floatEncoder](https://cs.opensource.google/go/go/+/master:src/encoding/json/encode.go;l=574?q=encode.go&ss=go%2Fgo)

when marshalling a time.Time with either timezone info `2024-03-31T15:09:16.822301-04:00` or without it as Z `2024-03-31T20:09:00.034949Z` the unmarshall throws this error `"... readObjectStart: expect { or n, but found ", error...