Fix missing list elements
This commit is contained in:
parent
37e8d9ae8a
commit
51eaeaae33
@ -314,7 +314,9 @@ public abstract class MoshiPolymorphic<OBJ> {
|
||||
public List<T> fromJson(@NotNull JsonReader jsonReader) throws IOException {
|
||||
jsonReader.beginArray();
|
||||
var result = new ArrayList<T>();
|
||||
result.add(valueAdapter.fromJson(jsonReader));
|
||||
while (jsonReader.hasNext()) {
|
||||
result.add(valueAdapter.fromJson(jsonReader));
|
||||
}
|
||||
jsonReader.endArray();
|
||||
return Collections.unmodifiableList(result);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user