Uses of Class
net.sf.json.JSONObject
-
Packages that use JSONObject Package Description net.sf.json The core of the librarynet.sf.json.processors Support for custom serializationnet.sf.json.test Testing utilitiesnet.sf.json.util Miscelaneous utilitiesnet.sf.json.xml Utilities for trasforming JSON to XML and back. -
-
Uses of JSONObject in net.sf.json
Methods in net.sf.json that return JSONObject Modifier and Type Method Description private JSONObject
JSONObject. _accumulate(java.lang.String key, java.lang.Object value, JsonConfig jsonConfig)
private static JSONObject
JSONObject. _fromBean(java.lang.Object bean, JsonConfig jsonConfig)
Creates a JSONObject from a POJO.
Supports nested maps, POJOs, and arrays/collections.private static JSONObject
JSONObject. _fromDynaBean(org.apache.commons.beanutils.DynaBean bean, JsonConfig jsonConfig)
private static JSONObject
JSONObject. _fromJSONObject(JSONObject object, JsonConfig jsonConfig)
private static JSONObject
JSONObject. _fromJSONString(JSONString string, JsonConfig jsonConfig)
private static JSONObject
JSONObject. _fromJSONTokener(JSONTokener tokener, JsonConfig jsonConfig)
private static JSONObject
JSONObject. _fromMap(java.util.Map map, JsonConfig jsonConfig)
private static JSONObject
JSONObject. _fromString(java.lang.String str, JsonConfig jsonConfig)
private JSONObject
JSONObject. _setInternal(java.lang.String key, java.lang.Object value, JsonConfig jsonConfig)
Put a key/value pair in the JSONObject.JSONObject
JSONObject. accumulate(java.lang.String key, boolean value)
Accumulate values under a key.JSONObject
JSONObject. accumulate(java.lang.String key, double value)
Accumulate values under a key.JSONObject
JSONObject. accumulate(java.lang.String key, int value)
Accumulate values under a key.JSONObject
JSONObject. accumulate(java.lang.String key, long value)
Accumulate values under a key.JSONObject
JSONObject. accumulate(java.lang.String key, java.lang.Object value)
Accumulate values under a key.JSONObject
JSONObject. accumulate(java.lang.String key, java.lang.Object value, JsonConfig jsonConfig)
Accumulate values under a key.private static JSONObject
JSONObject. defaultBeanProcessing(java.lang.Object bean, JsonConfig jsonConfig)
JSONObject
JSONObject. discard(java.lang.String key)
Remove a name and its value, if present.JSONObject
JSONObject. element(java.lang.String key, boolean value)
Put a key/boolean pair in the JSONObject.JSONObject
JSONObject. element(java.lang.String key, double value)
Put a key/double pair in the JSONObject.JSONObject
JSONObject. element(java.lang.String key, int value)
Put a key/int pair in the JSONObject.JSONObject
JSONObject. element(java.lang.String key, long value)
Put a key/long pair in the JSONObject.JSONObject
JSONObject. element(java.lang.String key, java.lang.Object value)
Put a key/value pair in the JSONObject.JSONObject
JSONObject. element(java.lang.String key, java.lang.Object value, JsonConfig jsonConfig)
Put a key/value pair in the JSONObject.JSONObject
JSONObject. element(java.lang.String key, java.util.Collection value)
Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection.JSONObject
JSONObject. element(java.lang.String key, java.util.Collection value, JsonConfig jsonConfig)
Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection.JSONObject
JSONObject. element(java.lang.String key, java.util.Map value)
Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map.JSONObject
JSONObject. element(java.lang.String key, java.util.Map value, JsonConfig jsonConfig)
Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map.JSONObject
JSONObject. elementOpt(java.lang.String key, java.lang.Object value)
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.JSONObject
JSONObject. elementOpt(java.lang.String key, java.lang.Object value, JsonConfig jsonConfig)
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.static JSONObject
JSONObject. fromObject(java.lang.Object object)
Creates a JSONObject.
Inspects the object type to call the correct JSONObject factory method.static JSONObject
JSONObject. fromObject(java.lang.Object object, JsonConfig jsonConfig)
Creates a JSONObject.
Inspects the object type to call the correct JSONObject factory method.JSONObject
JSONArray. getJSONObject(int index)
Get the JSONObject associated with an index.JSONObject
JSONObject. getJSONObject(java.lang.String key)
Get the JSONObject value associated with a key.JSONObject
JSONArray. optJSONObject(int index)
Get the optional JSONObject associated with an index.JSONObject
JSONObject. optJSONObject(java.lang.String key)
Get an optional JSONObject associated with a key.private JSONObject
JSONObject. setInternal(java.lang.String key, java.lang.Object value, JsonConfig jsonConfig)
Put a key/value pair in the JSONObject.JSONObject
JSONArray. toJSONObject(JSONArray names)
Produce a JSONObject by combining a JSONArray of names with the values of this JSONArray.Methods in net.sf.json with parameters of type JSONObject Modifier and Type Method Description private static JSONObject
JSONObject. _fromJSONObject(JSONObject object, JsonConfig jsonConfig)
JSONArray
JSONArray. element(JSONObject value)
Append an JSON value.java.util.Collection
AbstractJSON.WritingVisitor. keySet(JSONObject o)
private static void
JSONObject. setValue(JSONObject jsonObject, java.lang.String key, java.lang.Object value, java.lang.Class type, JsonConfig jsonConfig, boolean bypass)
static java.lang.Object
JSONObject. toBean(JSONObject jsonObject)
static java.lang.Object
JSONObject. toBean(JSONObject jsonObject, java.lang.Class beanClass)
Creates a bean from a JSONObject, with a specific target class.static java.lang.Object
JSONObject. toBean(JSONObject jsonObject, java.lang.Class beanClass, java.util.Map classMap)
Creates a bean from a JSONObject, with a specific target class.
If beanClass is null, this method will return a graph of DynaBeans.static java.lang.Object
JSONObject. toBean(JSONObject jsonObject, java.lang.Object bean, JsonConfig jsonConfig)
Creates a bean from a JSONObject, with the specific configuration.static java.lang.Object
JSONObject. toBean(JSONObject jsonObject, JsonConfig jsonConfig)
Creates a bean from a JSONObject, with the specific configuration. -
Uses of JSONObject in net.sf.json.processors
Methods in net.sf.json.processors that return JSONObject Modifier and Type Method Description JSONObject
JsDateJsonBeanProcessor. processBean(java.lang.Object bean, JsonConfig jsonConfig)
Processes the input bean into a compatible JsDate.JSONObject
JsonBeanProcessor. processBean(java.lang.Object bean, JsonConfig jsonConfig)
Processes the bean an returns a suitable JSONObject representation. -
Uses of JSONObject in net.sf.json.test
Methods in net.sf.json.test with parameters of type JSONObject Modifier and Type Method Description static void
JSONAssert. assertEquals(java.lang.String message, java.lang.String expected, JSONObject actual)
Asserts that two JSONObjects are equal.static void
JSONAssert. assertEquals(java.lang.String expected, JSONObject actual)
Asserts that two JSONObjects are equal.static void
JSONAssert. assertEquals(java.lang.String message, JSONObject expected, java.lang.String actual)
Asserts that two JSONObjects are equal.static void
JSONAssert. assertEquals(java.lang.String message, JSONObject expected, JSONObject actual)
Asserts that two JSONObjects are equal.static void
JSONAssert. assertEquals(JSONObject expected, java.lang.String actual)
Asserts that two JSONObjects are equal.static void
JSONAssert. assertEquals(JSONObject expected, JSONObject actual)
Asserts that two JSONObjects are equal.private static java.lang.String
JSONAssert. missingAndUnexpectedNames(JSONObject expected, JSONObject actual)
private static java.lang.String
JSONAssert. missingExpectedNames(JSONObject expected, JSONObject actual)
private static java.lang.String
JSONAssert. unexpectedNames(JSONObject expected, JSONObject actual)
-
Uses of JSONObject in net.sf.json.util
Fields in net.sf.json.util declared as JSONObject Modifier and Type Field Description static JSONObject
CycleDetectionStrategy. IGNORE_PROPERTY_OBJ
Methods in net.sf.json.util that return JSONObject Modifier and Type Method Description abstract JSONObject
CycleDetectionStrategy. handleRepeatedReferenceAsObject(java.lang.Object reference)
Handle a repeated reference
Must return a valid JSONObject or null.JSONObject
CycleDetectionStrategy.LenientCycleDetectionStrategy. handleRepeatedReferenceAsObject(java.lang.Object reference)
JSONObject
CycleDetectionStrategy.LenientNoRefCycleDetectionStrategy. handleRepeatedReferenceAsObject(java.lang.Object reference)
JSONObject
CycleDetectionStrategy.StrictCycleDetectionStrategy. handleRepeatedReferenceAsObject(java.lang.Object reference)
Methods in net.sf.json.util with parameters of type JSONObject Modifier and Type Method Description static java.util.Map
JSONUtils. getProperties(JSONObject jsonObject)
Creates a Map with all the properties of the JSONObject.static org.apache.commons.beanutils.DynaBean
JSONUtils. newDynaBean(JSONObject jsonObject)
Creates a new MorphDynaBean from a JSONObject.static org.apache.commons.beanutils.DynaBean
JSONUtils. newDynaBean(JSONObject jsonObject, JsonConfig jsonConfig)
Creates a new MorphDynaBean from a JSONObject.java.lang.Object
NewBeanInstanceStrategy.DefaultNewBeanInstanceStrategy. newInstance(java.lang.Class target, JSONObject source)
abstract java.lang.Object
NewBeanInstanceStrategy. newInstance(java.lang.Class target, JSONObject source)
Creates a new instance.private static java.lang.String
WebUtils. toString(JSONObject jsonObject)
-
Uses of JSONObject in net.sf.json.xml
Methods in net.sf.json.xml with parameters of type JSONObject Modifier and Type Method Description private nu.xom.Element
XMLSerializer. processJSONObject(JSONObject jsonObject, nu.xom.Element root, java.lang.String[] expandableProperties, boolean isRoot)
private void
XMLSerializer. setOrAccumulate(JSONObject jsonObject, java.lang.String key, java.lang.Object value)
private void
XMLSerializer. setValue(JSONObject jsonObject, nu.xom.Element element, java.lang.String defaultType)
private java.lang.Object
XMLSerializer. simplifyValue(JSONObject parent, java.lang.Object json)
-