1
0
mirror of https://github.com/json-iterator/go.git synced 2025-07-06 23:37:39 +02:00

check null/true/false

This commit is contained in:
Tao Wen
2017-07-10 15:23:35 +08:00
parent c38e47d169
commit 0187038bad
7 changed files with 57 additions and 28 deletions

View File

@ -275,7 +275,7 @@ func (iter *Iterator) Read() interface{} {
case Number:
return iter.ReadFloat64()
case Nil:
iter.skipFixedBytes(4) // null
iter.skipFourBytes('n', 'u', 'l', 'l')
return nil
case Bool:
return iter.ReadBool()