mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 07:59:21 +08:00
JSON flattening.
This is a new API that makes it possible to do more interesting things with composition. It's currently write-only; doing composition on reads is much more difficult.
This commit is contained in:
@@ -103,7 +103,7 @@ final class RuntimeJsonAdapterFactory<T> implements JsonAdapter.Factory {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<JsonAdapter<Object>> jsonAdapters = new ArrayList<>();
|
||||
List<JsonAdapter<Object>> jsonAdapters = new ArrayList<>(subtypes.size());
|
||||
for (int i = 0, size = subtypes.size(); i < size; i++) {
|
||||
jsonAdapters.add(moshi.adapter(subtypes.get(i)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user