public class JsonUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIDENTIAL_PROPERTY_SET |
static String |
CONFIDENTIAL_PROPERTY_UNSET |
| Constructor and Description |
|---|
JsonUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getInt(org.codehaus.jettison.json.JSONObject jsonObject,
String key,
int dflt) |
static org.codehaus.jettison.json.JSONObject |
getJsonForRestModel(RestModel model,
boolean hideConfidentialProperties) |
static Object |
getJsonObject(Object object) |
static Object |
getJsonObject(Object object,
boolean hideConfidentialProperties) |
static String |
getString(org.codehaus.jettison.json.JSONObject jsonObject,
String key,
String dflt) |
static boolean |
isConfidentialProperty(Class clazz,
String getterMethodName) |
static org.codehaus.jettison.json.JSONArray |
processCollection(Collection c) |
static org.codehaus.jettison.json.JSONObject |
processMap(Map map) |
static void |
put(org.codehaus.jettison.json.JSONArray jsonArray,
org.codehaus.jettison.json.JSONObject item) |
static void |
put(org.codehaus.jettison.json.JSONObject jsonObject,
String key,
Object value) |
public static final String CONFIDENTIAL_PROPERTY_SET
public static final String CONFIDENTIAL_PROPERTY_UNSET
public static Object getJsonObject(Object object) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONExceptionpublic static Object getJsonObject(Object object, boolean hideConfidentialProperties) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONExceptionpublic static org.codehaus.jettison.json.JSONObject getJsonForRestModel(RestModel model, boolean hideConfidentialProperties)
public static boolean isConfidentialProperty(Class clazz, String getterMethodName)
public static org.codehaus.jettison.json.JSONArray processCollection(Collection c) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONExceptionpublic static org.codehaus.jettison.json.JSONObject processMap(Map map) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONExceptionpublic static String getString(org.codehaus.jettison.json.JSONObject jsonObject, String key, String dflt)
public static int getInt(org.codehaus.jettison.json.JSONObject jsonObject,
String key,
int dflt)
public static void put(org.codehaus.jettison.json.JSONObject jsonObject,
String key,
Object value)
public static void put(org.codehaus.jettison.json.JSONArray jsonArray,
org.codehaus.jettison.json.JSONObject item)
Copyright © 2017. All rights reserved.