forked from mirror/go-json
replace statForRetry with stat (review reflected)
This commit is contained in:
parent
e5e8ed62c8
commit
f83142d838
|
@ -280,8 +280,7 @@ func (s *Stream) skipObject(depth int64) error {
|
||||||
if char(p, cursor) == nul {
|
if char(p, cursor) == nul {
|
||||||
s.cursor = cursor
|
s.cursor = cursor
|
||||||
if s.read() {
|
if s.read() {
|
||||||
_, cursor, p = s.statForRetry()
|
_, cursor, p = s.stat()
|
||||||
cursor++
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
return errors.ErrUnexpectedEndOfJSON("string of object", cursor)
|
return errors.ErrUnexpectedEndOfJSON("string of object", cursor)
|
||||||
|
@ -344,8 +343,7 @@ func (s *Stream) skipArray(depth int64) error {
|
||||||
if char(p, cursor) == nul {
|
if char(p, cursor) == nul {
|
||||||
s.cursor = cursor
|
s.cursor = cursor
|
||||||
if s.read() {
|
if s.read() {
|
||||||
_, cursor, p = s.statForRetry()
|
_, cursor, p = s.stat()
|
||||||
cursor++
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
return errors.ErrUnexpectedEndOfJSON("string of object", cursor)
|
return errors.ErrUnexpectedEndOfJSON("string of object", cursor)
|
||||||
|
@ -403,8 +401,7 @@ func (s *Stream) skipValue(depth int64) error {
|
||||||
if char(p, cursor) == nul {
|
if char(p, cursor) == nul {
|
||||||
s.cursor = cursor
|
s.cursor = cursor
|
||||||
if s.read() {
|
if s.read() {
|
||||||
_, cursor, p = s.statForRetry()
|
_, cursor, p = s.stat()
|
||||||
cursor++
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
return errors.ErrUnexpectedEndOfJSON("value of string", s.totalOffset())
|
return errors.ErrUnexpectedEndOfJSON("value of string", s.totalOffset())
|
||||||
|
|
Loading…
Reference in New Issue