T
- The result type this parser produces.public class JsonParser<T> extends Object
Modifier and Type | Field and Description |
---|---|
static JsonParser<Event> |
EVENTS |
static JsonParser<ResultInfoSet> |
JOB_RESULTS |
static JsonParser<Result<List<Map<String,Job>>>> |
JOBS |
static JsonParser<Result<Key.Names>> |
KEYS |
static JsonParser<Map<String,Object>> |
MAP |
static JsonParser<Result<List<Map<String,Map<String,Object>>>>> |
RETMAPS |
static JsonParser<Result<List<Map<String,Object>>>> |
RUN_RESULTS |
static JsonParser<Result<List<ScheduledJob>>> |
SCHEDULED_JOB |
static JsonParser<Stats> |
STATS |
static JsonParser<Result<String>> |
STRING |
static JsonParser<Result<List<Token>>> |
TOKEN |
Constructor and Description |
---|
JsonParser(com.google.gson.reflect.TypeToken<T> type)
Created a new JsonParser for the given type.
|
Modifier and Type | Method and Description |
---|---|
T |
parse(InputStream inputStream)
Parses a Json response that has a direct representation as a Java class.
|
T |
parse(String jsonString)
Parse JSON given as string.
|
public static final JsonParser<Result<String>> STRING
public static final JsonParser<Result<List<Token>>> TOKEN
public static final JsonParser<Result<List<ScheduledJob>>> SCHEDULED_JOB
public static final JsonParser<ResultInfoSet> JOB_RESULTS
public static final JsonParser<Stats> STATS
public static final JsonParser<Result<Key.Names>> KEYS
public static final JsonParser<Map<String,Object>> MAP
public static final JsonParser<Event> EVENTS
public JsonParser(com.google.gson.reflect.TypeToken<T> type)
type
- A TypeToken describing the type this parser produces.public T parse(InputStream inputStream)
inputStream
- result stream to parse.Copyright © 2016. All rights reserved.