T - the type of the resulting Java objectspublic class JsonConverter<T> extends InputStreamConverter<T>
Converter that converts JSON
data into Java Objects of type T.| Constructor and Description |
|---|
JsonConverter(java.lang.Class<T> clazz)
Create a JsonConverter that will generate instances of the specified
class.
|
JsonConverter(java.lang.String tag,
java.lang.Class<T> clazz)
Create a JsonConverter that will generate instances of the specified
class.
|
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Get the next available data entity in the desired type
|
void |
initialize(java.io.InputStream input)
Initialize the raw data.
|
boolean |
next()
Indicate whether or not more data can be expected from this converter.
|
public JsonConverter(java.lang.Class<T> clazz)
clazz - the entities returned by the get() call will be of
class clazzpublic JsonConverter(java.lang.String tag,
java.lang.Class<T> clazz)
tag parameter.clazz - the entities returned by the get() call will be of
class clazztag - the name of the json node(s) holding the data entity(ies).public void initialize(java.io.InputStream input)
ConverterXmlConverter, for example,
the DOM-model is created in this method.input - the raw input.public T get()
Converterpublic boolean next()
Converterfalse a call to Converter.get()
will fail.