public class SocialJsonUtils extends Object
Constructor and Description |
---|
SocialJsonUtils() |
Modifier and Type | Method and Description |
---|---|
static Object[] |
jsonArrayToArray(JSONArray node)
Convert a json array to a java list.
|
static Object |
jsonDataToObject(JSONArray node,
int field)
Takes any kind of json node and converts it to a java Object.
|
static Object |
jsonDataToObject(JSONObject node,
String field)
Takes any kind of json node and converts it to a java Object.
|
static Map<String,Object> |
jsonObjectToMap(JSONObject node)
Takes a json object (ie, unordered key/value data) and converts it to a java Map.
|
public static Map<String,Object> jsonObjectToMap(JSONObject node) throws JSONException
node
- the node to transformJSONException
- when the object can't be parsedpublic static Object jsonDataToObject(JSONObject node, String field) throws JSONException
node
- the node to transformfield
- the field in the JSONObject to convertJSONException
public static Object jsonDataToObject(JSONArray node, int field) throws JSONException
node
- the node to transformfield
- the field in the JSONObject to convertJSONException
public static Object[] jsonArrayToArray(JSONArray node) throws JSONException
node
- the node to transformJSONException
- on failure"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"