-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
JsonReader.skipValue()
(#2062)
* Fix JsonReader.skipValue() not behaving properly at end of document JsonReader implementation erroneously reset `peeked` to PEEKED_NONE; JsonTreeReader threw ArrayIndexOutOfBoundsException. * Fix JsonReader.skipValue() not behaving properly at end of array and object For JsonReader this caused an IllegalStateException (in the past it caused JsonReader to get stuck in an infinite loop); for JsonTreeReader it only popped the empty iterator but not the JsonArray or JsonObject, which caused peek() to again report END_ARRAY or END_OBJECT. * Only have JsonReader.skipValue() overwrite path name when name was skipped This improves the JSON path when the value for a property was skipped and before the subsequent property (or the end of the object) getPath() is called. * Address feedback; improve test coverage Co-authored-by: Éamonn McManus <emcmanus@google.com>
- Loading branch information
1 parent
e614e71
commit 5269701
Showing
5 changed files
with
309 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.