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 utilities -
-
Uses of JSONObject in net.sf.json
Methods in net.sf.json that return JSONObject Modifier and Type Method Description JSONObjectJSONObject. accumulate(String key, boolean value)Accumulate values under a key.JSONObjectJSONObject. accumulate(String key, double value)Accumulate values under a key.JSONObjectJSONObject. accumulate(String key, int value)Accumulate values under a key.JSONObjectJSONObject. accumulate(String key, long value)Accumulate values under a key.JSONObjectJSONObject. accumulate(String key, Object value)Accumulate values under a key.JSONObjectJSONObject. accumulate(String key, Object value, JsonConfig jsonConfig)Accumulate values under a key.JSONObjectJSONObject. discard(String key)Remove a name and its value, if present.JSONObjectJSONObject. element(String key, boolean value)Put a key/boolean pair in the JSONObject.JSONObjectJSONObject. element(String key, double value)Put a key/double pair in the JSONObject.JSONObjectJSONObject. element(String key, int value)Put a key/int pair in the JSONObject.JSONObjectJSONObject. element(String key, long value)Put a key/long pair in the JSONObject.JSONObjectJSONObject. element(String key, Object value)Put a key/value pair in the JSONObject.JSONObjectJSONObject. element(String key, Object value, JsonConfig jsonConfig)Put a key/value pair in the JSONObject.JSONObjectJSONObject. element(String key, Collection value)Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection.JSONObjectJSONObject. element(String key, 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.JSONObjectJSONObject. element(String key, Map value)Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map.JSONObjectJSONObject. element(String key, 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.JSONObjectJSONObject. elementOpt(String key, Object value)Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.JSONObjectJSONObject. elementOpt(String key, 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 JSONObjectJSONObject. fromObject(Object object)Creates a JSONObject.
Inspects the object type to call the correct JSONObject factory method.static JSONObjectJSONObject. fromObject(Object object, JsonConfig jsonConfig)Creates a JSONObject.
Inspects the object type to call the correct JSONObject factory method.JSONObjectJSONArray. getJSONObject(int index)Get the JSONObject associated with an index.JSONObjectJSONObject. getJSONObject(String key)Get the JSONObject value associated with a key.JSONObjectJSONArray. optJSONObject(int index)Get the optional JSONObject associated with an index.JSONObjectJSONObject. optJSONObject(String key)Get an optional JSONObject associated with a key.JSONObjectJSONArray. 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 JSONArrayJSONArray. element(JSONObject value)Append an JSON value.static ObjectJSONObject. toBean(JSONObject jsonObject)static ObjectJSONObject. toBean(JSONObject jsonObject, Class beanClass)Creates a bean from a JSONObject, with a specific target class.static ObjectJSONObject. toBean(JSONObject jsonObject, Class beanClass, 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 ObjectJSONObject. toBean(JSONObject jsonObject, Object bean, JsonConfig jsonConfig)Creates a bean from a JSONObject, with the specific configuration.static ObjectJSONObject. 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 JSONObjectJsDateJsonBeanProcessor. processBean(Object bean, JsonConfig jsonConfig)Processes the input bean into a compatible JsDate.JSONObjectJsonBeanProcessor. processBean(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 voidJSONAssert. assertEquals(String message, String expected, JSONObject actual)Asserts that two JSONObjects are equal.static voidJSONAssert. assertEquals(String expected, JSONObject actual)Asserts that two JSONObjects are equal.static voidJSONAssert. assertEquals(String message, JSONObject expected, String actual)Asserts that two JSONObjects are equal.static voidJSONAssert. assertEquals(String message, JSONObject expected, JSONObject actual)Asserts that two JSONObjects are equal.static voidJSONAssert. assertEquals(JSONObject expected, String actual)Asserts that two JSONObjects are equal.static voidJSONAssert. assertEquals(JSONObject expected, JSONObject actual)Asserts that two JSONObjects are equal. -
Uses of JSONObject in net.sf.json.util
Fields in net.sf.json.util declared as JSONObject Modifier and Type Field Description static JSONObjectCycleDetectionStrategy. IGNORE_PROPERTY_OBJMethods in net.sf.json.util that return JSONObject Modifier and Type Method Description abstract JSONObjectCycleDetectionStrategy. handleRepeatedReferenceAsObject(Object reference)Handle a repeated reference
Must return a valid JSONObject or null.Methods in net.sf.json.util with parameters of type JSONObject Modifier and Type Method Description static MapJSONUtils. getProperties(JSONObject jsonObject)Creates a Map with all the properties of the JSONObject.static org.apache.commons.beanutils.DynaBeanJSONUtils. newDynaBean(JSONObject jsonObject)Creates a new MorphDynaBean from a JSONObject.static org.apache.commons.beanutils.DynaBeanJSONUtils. newDynaBean(JSONObject jsonObject, JsonConfig jsonConfig)Creates a new MorphDynaBean from a JSONObject.abstract ObjectNewBeanInstanceStrategy. newInstance(Class target, JSONObject source)Creates a new instance.
-