1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

#31 support json.RawMessage

This commit is contained in:
Tao Wen
2017-06-02 10:50:23 +08:00
parent ad3a7fde32
commit fe9fa8900e
4 changed files with 46 additions and 6 deletions

View File

@ -145,6 +145,9 @@ func (iter *Iterator) readNumberAsString() (ret string) {
if iter.Error != nil && iter.Error != io.EOF {
return
}
if len(str) == 0 {
iter.reportError("readNumberAsString", "invalid number")
}
return *(*string)(unsafe.Pointer(&str))
}