public class AFHelper
extends java.lang.Object
| Constructor and Description |
|---|
AFHelper() |
| Modifier and Type | Method and Description |
|---|---|
static org.json.JSONObject |
toJsonObject(java.util.Map<java.lang.String,?> map)
Return a copy of the contents of the given map as a
JSONObject. |
static java.util.List<java.lang.Object> |
toList(org.json.JSONArray array) |
static java.util.Map<java.lang.String,java.lang.Object> |
toMap(org.json.JSONObject jsonobj) |
public static org.json.JSONObject toJsonObject(java.util.Map<java.lang.String,?> map)
JSONObject. Instead of failing on
null values like the JSONObject map constructor, it cleans them up and
correctly converts them to JSONObject.NULL.public static java.util.Map<java.lang.String,java.lang.Object> toMap(org.json.JSONObject jsonobj)
throws org.json.JSONException
org.json.JSONExceptionpublic static java.util.List<java.lang.Object> toList(org.json.JSONArray array)
throws org.json.JSONException
org.json.JSONException