T - The result type this parser produces.public class JsonParser<T> extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static JsonParser<Event> | EVENTS | 
| static com.google.gson.Gson | GSON | 
| static JsonParser<ResultInfoSet> | JOB_RESULTS | 
| static JsonParser<Return<List<Map<String,Job>>>> | JOBS | 
| static JsonParser<Return<Key.Names>> | KEYS | 
| static JsonParser<Map<String,Object>> | MAP | 
| static JsonParser<Return<List<Map<String,Map<String,Object>>>>> | RETMAPS | 
| static JsonParser<Return<List<Map<String,Object>>>> | RUN_RESULTS | 
| static JsonParser<Return<List<Map<String,Result<SSHRawResult>>>>> | RUNSSHRAW_RESULTS | 
| static JsonParser<Return<List<ScheduledJob>>> | SCHEDULED_JOB | 
| static JsonParser<Stats> | STATS | 
| static JsonParser<Return<String>> | STRING | 
| static JsonParser<Return<List<Token>>> | TOKEN | 
| Constructor and Description | 
|---|
| JsonParser(com.google.gson.reflect.TypeToken<T> type)Created a new JsonParser for the given type. | 
| JsonParser(com.google.gson.reflect.TypeToken<T> type,
          com.google.gson.Gson gson)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 com.google.gson.Gson GSON
public static final JsonParser<Return<String>> STRING
public static final JsonParser<Return<List<Token>>> TOKEN
public static final JsonParser<Return<List<ScheduledJob>>> SCHEDULED_JOB
public static final JsonParser<ResultInfoSet> JOB_RESULTS
public static final JsonParser<Return<List<Map<String,Result<SSHRawResult>>>>> RUNSSHRAW_RESULTS
public static final JsonParser<Stats> STATS
public static final JsonParser<Return<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 JsonParser(com.google.gson.reflect.TypeToken<T> type, com.google.gson.Gson gson)
type - A TypeToken describing the type this parser produces.gson - Gson instance to use for parsing.public T parse(InputStream inputStream)
inputStream - result stream to parse.Copyright © 2016. All rights reserved.