File tree 2 files changed +19
-0
lines changed
src/main/java/com/fasterxml/jackson/databind/util
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1583,6 +1583,8 @@ public JsonToken nextToken() throws IOException
1583
1583
|| _currToken == JsonToken .END_ARRAY ) {
1584
1584
// Closing JSON Object/Array? Close matching context
1585
1585
_parsingContext = _parsingContext .parentOrCopy ();
1586
+ } else {
1587
+ _parsingContext .updateForValue ();
1586
1588
}
1587
1589
return _currToken ;
1588
1590
}
Original file line number Diff line number Diff line change @@ -92,10 +92,14 @@ public static TokenBufferReadContext createRootContext(JsonStreamContext origCon
92
92
}
93
93
94
94
public TokenBufferReadContext createChildArrayContext () {
95
+ // For current context there will be one next Array value, first:
96
+ ++_index ;
95
97
return new TokenBufferReadContext (this , TYPE_ARRAY , -1 );
96
98
}
97
99
98
100
public TokenBufferReadContext createChildObjectContext () {
101
+ // For current context there will be one next Object value, first:
102
+ ++_index ;
99
103
return new TokenBufferReadContext (this , TYPE_OBJECT , -1 );
100
104
}
101
105
@@ -132,4 +136,17 @@ public TokenBufferReadContext parentOrCopy() {
132
136
public void setCurrentName (String name ) throws JsonProcessingException {
133
137
_currentName = name ;
134
138
}
139
+
140
+ /*
141
+ /**********************************************************
142
+ /* Extended support for context updates
143
+ /**********************************************************
144
+ */
145
+
146
+ /**
147
+ * @since 2.10.1
148
+ */
149
+ public void updateForValue () {
150
+ ++_index ;
151
+ }
135
152
}
You can’t perform that action at this time.
0 commit comments