in core/protocols/aws-json-protocol/src/main/java/software/amazon/awssdk/protocols/json/internal/unmarshall/JsonUnmarshallingParser.java [322:355]
private void skipValue(JsonParser parser, JsonToken lookAhead) throws IOException {
JsonToken current = lookAhead != null ? lookAhead : parser.nextToken();
switch (current) {
case VALUE_STRING:
case VALUE_FALSE:
case VALUE_TRUE:
case VALUE_NULL:
case VALUE_NUMBER_FLOAT:
case VALUE_NUMBER_INT:
case VALUE_EMBEDDED_OBJECT:
return;
case START_OBJECT:
do {
// skip field name
current = parser.nextToken();
if (current == JsonToken.END_OBJECT) {
break;
}
skipValue(parser, null);
} while (true);
return;
case START_ARRAY:
do {
current = parser.nextToken();
if (current == JsonToken.END_ARRAY) {
break;
}
skipValue(parser, current);
} while (true);
return;
default:
throw new JsonParseException("unexpected JSON token - " + current);
}
}