| Package | Description |
|---|---|
| com.dslplatform.json | |
| com.dslplatform.json.runtime |
| Modifier and Type | Field and Description |
|---|---|
protected List<DslJson.ConverterFactory<JsonReader.ReadObject>> |
DslJson.readerFactories |
| Modifier and Type | Method and Description |
|---|---|
JsonReader.ReadObject |
DslJson.registerReader(Type manifest,
JsonReader.ReadObject<?> reader)
Register custom reader for specific type (JSON -> instance conversion).
|
<T> JsonReader.ReadObject<T> |
DslJson.tryFindReader(Class<T> manifest)
Try to find registered reader for provided type.
|
JsonReader.ReadObject<?> |
DslJson.tryFindReader(Type manifest)
Try to find registered reader for provided type.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
DslJson.deserialize(JsonReader.ReadObject<T> converter,
JsonReader<TContext> input)
Reusable deserialize API.
|
<T,S extends T> |
JsonReader.deserializeCollection(JsonReader.ReadObject<S> readObject) |
<T,S extends T> |
JsonReader.deserializeCollection(JsonReader.ReadObject<S> readObject,
Collection<T> res) |
<T,S extends T> |
JsonReader.deserializeNullableCollection(JsonReader.ReadObject<S> readObject) |
<T,S extends T> |
JsonReader.deserializeNullableCollection(JsonReader.ReadObject<S> readObject,
Collection<T> res) |
<T> Iterator<T> |
JsonReader.iterateOver(JsonReader.ReadObject<T> reader) |
<T> T |
JsonReader.next(JsonReader.ReadObject<T> reader)
Will advance to next token and read the JSON into specified type
|
<T> T[] |
JsonReader.readArray(JsonReader.ReadObject<T> readObject,
T[] emptyArray) |
<T> ArrayList<T> |
JsonReader.readCollection(JsonReader.ReadObject<T> readObject) |
<K,V> LinkedHashMap<K,V> |
JsonReader.readMap(JsonReader.ReadObject<K> readKey,
JsonReader.ReadObject<V> readValue) |
<K,V> LinkedHashMap<K,V> |
JsonReader.readMap(JsonReader.ReadObject<K> readKey,
JsonReader.ReadObject<V> readValue) |
<T> LinkedHashSet<T> |
JsonReader.readSet(JsonReader.ReadObject<T> readObject) |
<T,S extends T> |
DslJson.registerReader(Class<T> manifest,
JsonReader.ReadObject<S> reader)
Register custom reader for specific type (JSON -> instance conversion).
|
JsonReader.ReadObject |
DslJson.registerReader(Type manifest,
JsonReader.ReadObject<?> reader)
Register custom reader for specific type (JSON -> instance conversion).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
DslJson.registerReaderFactory(DslJson.ConverterFactory<? extends JsonReader.ReadObject> factory) |
DslJson.Settings<TContext> |
DslJson.Settings.resolveReader(DslJson.ConverterFactory<? extends JsonReader.ReadObject> reader)
DslJson will iterate over converter factories when requested type is unknown.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
FormatConverter<T> |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayDecoder<T> |
class |
ArrayFormatDescription<B,T> |
class |
CollectionDecoder<E,T extends Collection<E>> |
class |
EnumDescription<T extends Enum<T>> |
class |
FormatDescription<T> |
class |
ImmutableDescription<T> |
class |
MapDecoder<K,V,T extends Map<K,V>> |
class |
MixinDescription<T> |
class |
ObjectFormatDescription<B,T> |
class |
OptionalDecoder<T> |
| Modifier and Type | Field and Description |
|---|---|
static JsonReader.ReadObject<Object> |
ObjectAnalyzer.Runtime.JSON_READER |
static JsonReader.ReadObject<Map<String,Object>> |
MapAnalyzer.Runtime.JSON_READER |
static JsonReader.ReadObject<List<Object>> |
CollectionAnalyzer.Runtime.JSON_READER |
static JsonReader.ReadObject<Object[]> |
ArrayAnalyzer.Runtime.JSON_READER |
| Modifier and Type | Field and Description |
|---|---|
static DslJson.ConverterFactory<JsonReader.ReadObject> |
Settings.UNKNOWN_READER |
| Modifier and Type | Method and Description |
|---|---|
static <T,R> JsonReader.BindObject<T> |
Settings.createArrayDecoder(Settings.BiConsumer<T,R> write,
JsonReader.ReadObject<R> decoder) |
static <T,R> DecodePropertyInfo<JsonReader.BindObject<T>> |
Settings.createDecoder(Settings.BiConsumer<T,R> write,
String name,
DslJson json,
boolean exactNameMatch,
boolean isMandatory,
int index,
boolean nonNull,
JsonReader.ReadObject<R> decoder) |
| Constructor and Description |
|---|
ArrayDecoder(T[] emptyInstance,
JsonReader.ReadObject<T> decoder) |
CollectionDecoder(Type manifest,
Callable<T> newInstance,
JsonReader.ReadObject<E> decoder) |
MapDecoder(Type manifest,
Callable<T> newInstance,
JsonReader.ReadObject<K> keyDecoder,
JsonReader.ReadObject<V> valueDecoder) |
MapDecoder(Type manifest,
Callable<T> newInstance,
JsonReader.ReadObject<K> keyDecoder,
JsonReader.ReadObject<V> valueDecoder) |
OptionalDecoder(JsonReader.ReadObject<T> decoder) |
Copyright © 2023. All rights reserved.