public final class JsonCustomResponseFormat extends Object
Class which encapsulates behavior for the custom JSON response format. Note that this class is immutable; to change the containing JSON, a new class needs to be instantiated.
Constructor and Description |
---|
JsonCustomResponseFormat(String json)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
List<Map<String,Object>> |
getEntries()
Retrieves all the entries.
|
<T> List<T> |
toListOf(Class<T> clazz)
Converts the JSON string into a list of the specified class.
|
String |
toString() |
public JsonCustomResponseFormat(String json)
Default constructor.
json
- the JSON to formatpublic List<Map<String,Object>> getEntries()
Retrieves all the entries.
public <T> List<T> toListOf(Class<T> clazz)
Converts the JSON string into a list of the specified class.
T
- the data type of the listclazz
- the class to convert each JSON entry toCopyright © 2017. All rights reserved.