| 19 | import com.squareup.moshi.Moshi; |
| 20 | |
| 21 | public class MoshiFactory { |
| 22 | private MoshiFactory() {} |
| 23 | |
| 24 | /** |
| 25 | * Registers JsonAdapter by implicit type. Adds one to read numbers in a {@code Map<String, |
| 26 | * Object>} as Integers. |
| 27 | */ |
| 28 | static Moshi create(Iterable<JsonAdapter<?>> adapters) { |
| 29 | Moshi.Builder builder = new Moshi.Builder(); |
| 30 | |
| 31 | for (JsonAdapter<?> adapter : adapters) { |
| 32 | builder.add(adapter.getClass(), adapter); |
| 33 | } |
| 34 | |
| 35 | return builder.build(); |
| 36 | } |
| 37 | } |
nothing calls this directly
no outgoing calls
no test coverage detected