public final class JSONUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
unwrap(Class<? extends T> cls,
org.json.JSONArray jsonArray) |
static <T> T |
unwrap(Class<? extends T> cls,
org.json.JSONObject jsonObject) |
static <T> List<T> |
unwrap(org.json.JSONArray jsonArray) |
static <T> List<T> |
unwrap(org.json.JSONArray jsonArray,
Class<T> elementClass) |
static <T> List<T> |
unwrap(org.json.JSONArray jsonArray,
com.landawn.abacus.type.Type<T> elementType) |
static Map<String,Object> |
unwrap(org.json.JSONObject jsonObject) |
static <T> T |
unwrap(com.landawn.abacus.type.Type<? extends T> type,
org.json.JSONArray jsonArray) |
static <T> T |
unwrap(com.landawn.abacus.type.Type<? extends T> type,
org.json.JSONObject jsonObject) |
static org.json.JSONArray |
wrap(boolean[] array) |
static org.json.JSONArray |
wrap(byte[] array) |
static org.json.JSONArray |
wrap(char[] array) |
static org.json.JSONArray |
wrap(Collection<?> coll) |
static org.json.JSONArray |
wrap(double[] array) |
static org.json.JSONArray |
wrap(float[] array) |
static org.json.JSONArray |
wrap(int[] array) |
static org.json.JSONArray |
wrap(long[] array) |
static org.json.JSONObject |
wrap(Map<String,?> map) |
static org.json.JSONObject |
wrap(Object entity)
wrap(entity) -> wrap(Maps.deepEntity2Map(entity, true))
|
static org.json.JSONArray |
wrap(Object[] array) |
static org.json.JSONArray |
wrap(short[] array) |
public static org.json.JSONObject wrap(Object entity)
entity - Maps.deepEntity2Map(Object)public static org.json.JSONArray wrap(boolean[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(char[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(byte[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(short[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(int[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(long[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(float[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(double[] array)
throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(Object[] array) throws org.json.JSONException
array - org.json.JSONException - the JSON exceptionpublic static org.json.JSONArray wrap(Collection<?> coll)
coll - public static Map<String,Object> unwrap(org.json.JSONObject jsonObject) throws org.json.JSONException
jsonObject - org.json.JSONException - the JSON exceptionpublic static <T> T unwrap(Class<? extends T> cls, org.json.JSONObject jsonObject) throws org.json.JSONException
T - cls - jsonObject - org.json.JSONException - the JSON exceptionpublic static <T> T unwrap(com.landawn.abacus.type.Type<? extends T> type,
org.json.JSONObject jsonObject)
throws org.json.JSONException
T - type - jsonObject - org.json.JSONException - the JSON exceptionpublic static <T> List<T> unwrap(org.json.JSONArray jsonArray) throws org.json.JSONException
T - jsonArray - org.json.JSONException - the JSON exceptionpublic static <T> List<T> unwrap(org.json.JSONArray jsonArray, Class<T> elementClass) throws org.json.JSONException
T - jsonArray - elementClass - org.json.JSONException - the JSON exceptionpublic static <T> List<T> unwrap(org.json.JSONArray jsonArray, com.landawn.abacus.type.Type<T> elementType) throws org.json.JSONException
T - jsonArray - elementType - org.json.JSONException - the JSON exceptionpublic static <T> T unwrap(Class<? extends T> cls, org.json.JSONArray jsonArray) throws org.json.JSONException
T - cls - array or collection classjsonArray - org.json.JSONException - the JSON exceptionpublic static <T> T unwrap(com.landawn.abacus.type.Type<? extends T> type,
org.json.JSONArray jsonArray)
throws org.json.JSONException
T - type - jsonArray - org.json.JSONException - the JSON exceptionCopyright © 2021. All rights reserved.