mirror of
https://github.com/json-iterator/go.git
synced 2025-05-13 21:36:29 +02:00
Use readNumberAsString
This commit is contained in:
parent
be9d4ded4f
commit
90137b4a60
@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// ValueType the type for JSON element
|
||||
@ -276,8 +275,7 @@ func (iter *Iterator) Read() interface{} {
|
||||
return iter.ReadString()
|
||||
case Number:
|
||||
if iter.cfg.configBeforeFrozen.UseNumber {
|
||||
num := iter.ReadInt64()
|
||||
return json.Number(strconv.FormatInt(num, 10))
|
||||
return json.Number(iter.readNumberAsString())
|
||||
}
|
||||
return iter.ReadFloat64()
|
||||
case Nil:
|
||||
|
Loading…
x
Reference in New Issue
Block a user