public class JsonReader extends Object implements BinderJsonReader
| Constructor and Description |
|---|
JsonReader() |
JsonReader(BinderOptions format) |
| Modifier and Type | Method and Description |
|---|---|
protected Pair<Class,Class> |
getListElementClass(Class clazz) |
protected boolean |
isList(Class clazz) |
<T> T |
read(Class<? extends T> type,
InputStream source)
Read or deserialize an input stream into a POJO of specific type.
|
<T> T |
read(Class<? extends T> type,
Reader source)
Read or deserialize a character stream reader into a POJO of specific type.
|
<T> T |
read(Class<? extends T> type,
String source)
Read or deserialize an string into a POJO of specific type.
|
<L extends Collection<E>,E> |
readCollection(L collection,
Class<E> type,
InputStream source) |
<L extends Collection<E>,E> |
readCollection(L collection,
Class<E> type,
Reader source) |
<L extends Collection<E>,E> |
readCollection(L list,
Class<E> type,
String input) |
<E> List<E> |
readList(Class<E> type,
InputStream source) |
<E> List<E> |
readList(Class<E> type,
Reader source) |
<E> List<E> |
readList(Class<E> type,
String input) |
<M extends Map<K,V>,K,V> |
readMap(M map,
Class<K> keyType,
Class<V> valueType,
InputStream source) |
<M extends Map<K,V>,K,V> |
readMap(M map,
Class<K> keyType,
Class<V> valueType,
Reader source) |
<M extends Map<K,V>,K,V> |
readMap(M map,
Class<K> keyType,
Class<V> valueType,
String source) |
public JsonReader()
public JsonReader(BinderOptions format)
public <T> T read(Class<? extends T> type, InputStream source) throws ReaderException, MappingException
BinderReaderread in interface BinderReadertype - target typesource - an input streamReaderException - if reads failMappingExceptionpublic <T> T read(Class<? extends T> type, String source) throws ReaderException, MappingException
BinderReaderread in interface BinderReadertype - target typesource - a stringReaderException - if reads failMappingExceptionpublic <T> T read(Class<? extends T> type, Reader source) throws ReaderException, MappingException
BinderReaderread in interface BinderReadertype - target typesource - a character stream readerReaderException - if reads failMappingExceptionpublic <E> List<E> readList(Class<E> type, String input) throws ReaderException
readList in interface BinderJsonReaderReaderExceptionpublic <E> List<E> readList(Class<E> type, InputStream source) throws ReaderException
readList in interface BinderJsonReaderReaderExceptionpublic <E> List<E> readList(Class<E> type, Reader source) throws ReaderException, MappingException
readList in interface BinderJsonReaderReaderExceptionMappingExceptionpublic <L extends Collection<E>,E> L readCollection(L list, Class<E> type, String input) throws ReaderException
readCollection in interface BinderJsonReaderReaderExceptionpublic <L extends Collection<E>,E> L readCollection(L collection, Class<E> type, InputStream source) throws ReaderException
readCollection in interface BinderJsonReaderReaderExceptionpublic <L extends Collection<E>,E> L readCollection(L collection, Class<E> type, Reader source) throws ReaderException, MappingException
readCollection in interface BinderJsonReaderReaderExceptionMappingExceptionprotected boolean isList(Class clazz)
public <M extends Map<K,V>,K,V> M readMap(M map, Class<K> keyType, Class<V> valueType, String source) throws ReaderException
readMap in interface BinderJsonReaderReaderExceptionpublic <M extends Map<K,V>,K,V> M readMap(M map, Class<K> keyType, Class<V> valueType, InputStream source) throws ReaderException
readMap in interface BinderJsonReaderReaderExceptionpublic <M extends Map<K,V>,K,V> M readMap(M map, Class<K> keyType, Class<V> valueType, Reader source) throws ReaderException, MappingException
readMap in interface BinderJsonReaderReaderExceptionMappingExceptionCopyright © 2016. All rights reserved.