You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-11-29 22:47:28 +02:00
#68 float to int
This commit is contained in:
@@ -43,5 +43,5 @@ func (decoder *FuzzyIntDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterat
|
||||
default:
|
||||
iter.ReportError("FuzzyIntDecoder", "not number or string")
|
||||
}
|
||||
*((*int)(ptr)) = iter.ReadInt()
|
||||
*((*int)(ptr)) = int(iter.ReadFloat64())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user