diff --git a/decode_string.go b/decode_string.go index 4eeb633..b521d11 100644 --- a/decode_string.go +++ b/decode_string.go @@ -115,7 +115,7 @@ func (d *stringDecoder) decodeByte(buf []byte, cursor int64) ([]byte, int64, err literal := buf[start:cursor] cursor++ return literal, cursor, nil - case '\000': + case nul: return nil, 0, errUnexpectedEndOfJSON("string", cursor) } cursor++