public class GsonUtils
extends java.lang.Object
| Constructor and Description |
|---|
GsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
get(com.google.gson.JsonElement jsonElement,
java.lang.String path) |
static java.lang.Object |
get(com.google.gson.JsonElement jsonElement,
java.lang.String path,
int index) |
static java.lang.Object |
get(java.lang.String jsonString,
java.lang.String path,
int index) |
static com.google.gson.JsonElement |
getPathObject(com.google.gson.JsonArray jsonArray,
java.lang.String name) |
static com.google.gson.JsonElement |
getPathObject(com.google.gson.JsonObject jsonObject,
java.lang.String name) |
static com.google.gson.JsonElement |
getPathObjectDot(com.google.gson.JsonElement je,
java.lang.String path) |
static com.google.gson.JsonElement |
getPathObjectDot(com.google.gson.JsonElement je,
java.lang.String path,
int index) |
static com.google.gson.JsonElement |
getPathObjectSlash(com.google.gson.JsonElement je,
java.lang.String path) |
static com.google.gson.JsonElement |
getPathObjectSlash(com.google.gson.JsonElement je,
java.lang.String path,
int index) |
static org.json.JSONObject |
mapXmlToJson(java.lang.String xml,
boolean escape) |
static java.lang.Object |
toMap(com.google.gson.JsonElement je,
java.lang.String path,
int index,
int[] newRowCount) |
static void |
toMap(com.google.gson.JsonElement jsonElement,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> map) |
public static java.lang.Object toMap(com.google.gson.JsonElement je,
java.lang.String path,
int index,
int[] newRowCount)
je - - This is the JsonElement we want to mappath - - This is the target pathindex - - an index we want from the path.newRowCount - - we use this to pass back the new index - check does it match the index passed in???public static com.google.gson.JsonElement getPathObjectDot(com.google.gson.JsonElement je,
java.lang.String path,
int index)
public static com.google.gson.JsonElement getPathObjectDot(com.google.gson.JsonElement je,
java.lang.String path)
public static com.google.gson.JsonElement getPathObjectSlash(com.google.gson.JsonElement je,
java.lang.String path,
int index)
public static com.google.gson.JsonElement getPathObjectSlash(com.google.gson.JsonElement je,
java.lang.String path)
public static com.google.gson.JsonElement getPathObject(com.google.gson.JsonArray jsonArray,
java.lang.String name)
public static com.google.gson.JsonElement getPathObject(com.google.gson.JsonObject jsonObject,
java.lang.String name)
public static void toMap(com.google.gson.JsonElement jsonElement,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> map)
public static java.lang.Object get(com.google.gson.JsonElement jsonElement,
java.lang.String path)
public static java.lang.Object get(com.google.gson.JsonElement jsonElement,
java.lang.String path,
int index)
public static java.lang.Object get(java.lang.String jsonString,
java.lang.String path,
int index)
public static org.json.JSONObject mapXmlToJson(java.lang.String xml,
boolean escape)