@Test public void testTypeTokenList() { JsonCodec<List<Person>> jsonCodec = jsonCodec(new TypeToken<List<Person>>() {}); Person.validatePersonListJsonCodec(jsonCodec); }
public static <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(OBJECT_MAPPER_SUPPLIER.get(), type); }
JsonCodec { public static <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(OBJECT_MAPPER_SUPPLIER.get(), type); } }
JsonCodec { public static <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(OBJECT_MAPPER_SUPPLIER.get(), type); } JsonCodec(ObjectMapper mapper, Type type); }
JsonCodec { public static <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(OBJECT_MAPPER_SUPPLIER.get(), type); } JsonCodec(ObjectMapper mapper, Type type); static JsonCodec<T> jsonCodec(Class<T> type); static JsonCodec<T> jsonCodec(TypeToken<T> type); static JsonCodec<List<T>> listJsonCodec(Class<T> type); static JsonCodec<List<T>> listJsonCodec(JsonCodec<T> type); static JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, Class<V> valueType); static JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, JsonCodec<V> valueType); JsonCodec<T> withoutPretty(); Type getType(); T fromJson(String json); String toJson(T instance); Optional<String> toJsonWithLengthLimit(T instance, int lengthLimit); T fromJson(byte[] json); byte[] toJsonBytes(T instance); }
JsonCodec { public static <T> JsonCodec<T> jsonCodec(Class<T> type) { requireNonNull(type, "type is null"); return new JsonCodec<>(OBJECT_MAPPER_SUPPLIER.get(), type); } JsonCodec(ObjectMapper mapper, Type type); static JsonCodec<T> jsonCodec(Class<T> type); static JsonCodec<T> jsonCodec(TypeToken<T> type); static JsonCodec<List<T>> listJsonCodec(Class<T> type); static JsonCodec<List<T>> listJsonCodec(JsonCodec<T> type); static JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, Class<V> valueType); static JsonCodec<Map<K, V>> mapJsonCodec(Class<K> keyType, JsonCodec<V> valueType); JsonCodec<T> withoutPretty(); Type getType(); T fromJson(String json); String toJson(T instance); Optional<String> toJsonWithLengthLimit(T instance, int lengthLimit); T fromJson(byte[] json); byte[] toJsonBytes(T instance);  }