We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa748f3 commit f0db661Copy full SHA for f0db661
src/main/java/org/eclipse/yasson/internal/jsonstructure/JsonStructureToParserAdapter.java
@@ -122,7 +122,13 @@ public JsonObject getObject() {
122
123
@Override
124
public JsonArray getArray() {
125
- throw new UnsupportedOperationException();
+ JsonStructureIterator current = iterators.peek();
126
+ if (current instanceof JsonArrayIterator) {
127
+ iterators.pop();
128
+ return getValue().asJsonArray();
129
+ } else {
130
+ throw new JsonbException(Messages.getMessage(MessageKeys.INTERNAL_ERROR, "Outside of array context"));
131
+ }
132
}
133
134
private JsonNumber getJsonNumberValue() {
0 commit comments