github.com/zerosnake0/jzon@v0.0.9-0.20230801092939-1b135cb83f7f/iterator_null.go (about) 1 package jzon 2 3 // ReadNull reads a nil 4 func (it *Iterator) ReadNull() error { 5 c, err := it.nextToken() 6 if err != nil { 7 return err 8 } 9 if c != 'n' { 10 return UnexpectedByteError{got: c, exp: 'n'} 11 } 12 it.head++ 13 return it.expectBytes("ull") 14 }