You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var (
jsonToTest = []byte("{"Tfloat":1.122e+250}")
)
func main() {
n := TestStruct{}
err := jsoniter.Unmarshal(jsonToTest, &n)
if err != nil {
panic(err)
}
log.Println("Original:", n)
}
with large number the jsoniter.Any is broken
error message is like:
panic: main.TestStruct.Tfloat: strconv.ParseFloat: parsing "1.122e+250": value out of range
using interface{} is OK
json.RawMessage is not OK
The text was updated successfully, but these errors were encountered:
https://play.golang.org/p/k8N1_YAYB__s
package main
import (
"log"
"github.com/json-iterator/go"
)
type TestStruct struct {
Tfloat jsoniter.Any
}
var (
jsonToTest = []byte("{"Tfloat":1.122e+250}")
)
func main() {
n := TestStruct{}
err := jsoniter.Unmarshal(jsonToTest, &n)
}
with large number the jsoniter.Any is broken
error message is like:
panic: main.TestStruct.Tfloat: strconv.ParseFloat: parsing "1.122e+250": value out of range
using interface{} is OK
json.RawMessage is not OK
The text was updated successfully, but these errors were encountered: