From 3e25104a7cda232e682b2e88bc07830b13dd405c Mon Sep 17 00:00:00 2001 From: KimHyeonwoo Date: Mon, 18 Jul 2022 21:35:32 +0900 Subject: [PATCH] fix cursor issue for `skipArray`, `skipValue` --- internal/decoder/stream.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/decoder/stream.go b/internal/decoder/stream.go index 8e21c56..f1a5809 100644 --- a/internal/decoder/stream.go +++ b/internal/decoder/stream.go @@ -345,6 +345,7 @@ func (s *Stream) skipArray(depth int64) error { s.cursor = cursor if s.read() { _, cursor, p = s.statForRetry() + cursor++ continue } return errors.ErrUnexpectedEndOfJSON("string of object", cursor) @@ -403,6 +404,7 @@ func (s *Stream) skipValue(depth int64) error { s.cursor = cursor if s.read() { _, cursor, p = s.statForRetry() + cursor++ continue } return errors.ErrUnexpectedEndOfJSON("value of string", s.totalOffset())