Uses of Class
net.sf.json.JsonConfig
Packages that use JsonConfig
Package
Description
The core of the library
Support for custom serialization
Miscelaneous utilities
-
Uses of JsonConfig in net.sf.json
Methods in net.sf.json that return JsonConfigMethods in net.sf.json with parameters of type JsonConfigModifier and TypeMethodDescriptionprivate JSONObject
JSONObject._accumulate
(String key, Object value, JsonConfig jsonConfig) private JSONArray
JSONArray._addValue
(Object value, JsonConfig jsonConfig) Append an object value.private static JSONArray
JSONArray._fromArray
(boolean[] array, JsonConfig jsonConfig) Construct a JSONArray from an boolean[].private static JSONArray
JSONArray._fromArray
(byte[] array, JsonConfig jsonConfig) Construct a JSONArray from an byte[].private static JSONArray
JSONArray._fromArray
(char[] array, JsonConfig jsonConfig) Construct a JSONArray from an char[].private static JSONArray
JSONArray._fromArray
(double[] array, JsonConfig jsonConfig) Construct a JSONArray from an double[].private static JSONArray
JSONArray._fromArray
(float[] array, JsonConfig jsonConfig) Construct a JSONArray from an float[].private static JSONArray
JSONArray._fromArray
(int[] array, JsonConfig jsonConfig) Construct a JSONArray from an int[].private static JSONArray
JSONArray._fromArray
(long[] array, JsonConfig jsonConfig) Construct a JSONArray from an long[].private static JSONArray
JSONArray._fromArray
(short[] array, JsonConfig jsonConfig) Construct a JSONArray from an short[].private static JSONArray
JSONArray._fromArray
(Enum e, JsonConfig jsonConfig) Construct a JSONArray from an Enum value.private static JSONArray
JSONArray._fromArray
(Object[] array, JsonConfig jsonConfig) private static JSONObject
JSONObject._fromBean
(Object bean, JsonConfig jsonConfig) Creates a JSONObject from a POJO.
Supports nested maps, POJOs, and arrays/collections.private static JSONArray
JSONArray._fromCollection
(Collection collection, JsonConfig jsonConfig) private static JSONObject
JSONObject._fromDynaBean
(org.apache.commons.beanutils.DynaBean bean, JsonConfig jsonConfig) private static JSONArray
JSONArray._fromJSONArray
(JSONArray array, JsonConfig jsonConfig) private static JSONObject
JSONObject._fromJSONObject
(JSONObject object, JsonConfig jsonConfig) private static JSONArray
JSONArray._fromJSONString
(JSONString string, JsonConfig jsonConfig) private static JSONObject
JSONObject._fromJSONString
(JSONString string, JsonConfig jsonConfig) private static JSONArray
JSONArray._fromJSONTokener
(JSONTokener tokener, JsonConfig jsonConfig) private static JSONObject
JSONObject._fromJSONTokener
(JSONTokener tokener, JsonConfig jsonConfig) private static JSONObject
JSONObject._fromMap
(Map map, JsonConfig jsonConfig) private static JSONArray
JSONArray._fromString
(String string, JsonConfig jsonConfig) private static JSONObject
JSONObject._fromString
(String str, JsonConfig jsonConfig) protected Object
AbstractJSON._processValue
(Object value, JsonConfig jsonConfig) protected Object
JSONArray._processValue
(Object value, JsonConfig jsonConfig) protected Object
JSONObject._processValue
(Object value, JsonConfig jsonConfig) private JSONObject
JSONObject._setInternal
(String key, Object value, JsonConfig jsonConfig) Put a key/value pair in the JSONObject.JSONObject.accumulate
(String key, Object value, JsonConfig jsonConfig) Accumulate values under a key.void
JSONObject.accumulateAll
(Map map, JsonConfig jsonConfig) void
JSONArray.add
(int index, Object value, JsonConfig jsonConfig) boolean
JSONArray.add
(Object value, JsonConfig jsonConfig) boolean
JSONArray.addAll
(int index, Collection collection, JsonConfig jsonConfig) boolean
JSONArray.addAll
(Collection collection, JsonConfig jsonConfig) private JSONArray
JSONArray.addValue
(Object value, JsonConfig jsonConfig) Append an object value.boolean
JSONArray.contains
(Object o, JsonConfig jsonConfig) boolean
JSONArray.containsAll
(Collection collection, JsonConfig jsonConfig) boolean
JSONObject.containsValue
(Object value, JsonConfig jsonConfig) private static Object
JSONObject.convertPropertyValueToArray
(String key, Object value, Class targetType, JsonConfig jsonConfig, Map classMap) private static Collection
JSONObject.convertPropertyValueToCollection
(String key, Object value, JsonConfig jsonConfig, String name, Map classMap, Class collectionType) private static List
JSONObject.convertPropertyValueToList
(String key, Object value, JsonConfig jsonConfig, String name, Map classMap) private static JSONObject
JSONObject.defaultBeanProcessing
(Object bean, JsonConfig jsonConfig) JSONArray.element
(int index, Object value, JsonConfig jsonConfig) Put or replace an object value in the JSONArray.JSONArray.element
(int index, String value, JsonConfig jsonConfig) Put or replace a String value in the JSONArray.JSONArray.element
(int index, Collection value, JsonConfig jsonConfig) Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.JSONArray.element
(int index, Map value, JsonConfig jsonConfig) Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.JSONArray.element
(Object value, JsonConfig jsonConfig) Append an object value.JSONArray.element
(String value, JsonConfig jsonConfig) Append a String value.JSONArray.element
(Collection value, JsonConfig jsonConfig) Append a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.JSONArray.element
(Map value, JsonConfig jsonConfig) Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.JSONObject.element
(String key, Object value, JsonConfig jsonConfig) Put a key/value pair in the JSONObject.JSONObject.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.JSONObject.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.JSONObject.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.protected static void
AbstractJSON.fireArrayEndEvent
(JsonConfig jsonConfig) Fires an end of array event.protected static void
AbstractJSON.fireArrayStartEvent
(JsonConfig jsonConfig) Fires a start of array event.protected static void
AbstractJSON.fireElementAddedEvent
(int index, Object element, JsonConfig jsonConfig) Fires an element added event.protected static void
AbstractJSON.fireErrorEvent
(JSONException jsone, JsonConfig jsonConfig) Fires an error event.protected static void
AbstractJSON.fireObjectEndEvent
(JsonConfig jsonConfig) Fires an end of object event.protected static void
AbstractJSON.fireObjectStartEvent
(JsonConfig jsonConfig) Fires a start of object event.protected static void
AbstractJSON.firePropertySetEvent
(String key, Object value, boolean accumulated, JsonConfig jsonConfig) Fires a property set event.protected static void
AbstractJSON.fireWarnEvent
(String warning, JsonConfig jsonConfig) Fires a warning event.static JSONArray
JSONArray.fromObject
(Object object, JsonConfig jsonConfig) Creates a JSONArray.
Inspects the object type to call the correct JSONArray factory method.static JSONObject
JSONObject.fromObject
(Object object, JsonConfig jsonConfig) Creates a JSONObject.
Inspects the object type to call the correct JSONObject factory method.private static JSONObject.Property
JSONObject.getProperty
(Class beanClass, Object bean, String key, JsonConfig jsonConfig) private static boolean
JSONObject.isTransient
(AnnotatedElement element, JsonConfig jsonConfig) private static boolean
JSONObject.isTransientField
(Field field, JsonConfig jsonConfig) private static boolean
JSONObject.isTransientField
(String name, Class beanClass, JsonConfig jsonConfig) JSONObject.names
(JsonConfig jsonConfig) Produce a JSONArray containing the names of the elements of this JSONObject.private Object
JSONArray.processValue
(Object value, JsonConfig jsonConfig) private Object
JSONObject.processValue
(Object value, JsonConfig jsonConfig) private Object
JSONObject.processValue
(String key, Object value, JsonConfig jsonConfig) void
JSONObject.putAll
(Map map, JsonConfig jsonConfig) boolean
JSONArray.removeAll
(Collection collection, JsonConfig jsonConfig) boolean
JSONArray.retainAll
(Collection collection, JsonConfig jsonConfig) JSONArray.set
(int index, Object value, JsonConfig jsonConfig) void
JSONObject.FieldProperty.set
(Object bean, Object value, JsonConfig jsonConfig) void
JSONObject.MethodProperty.set
(Object bean, Object value, JsonConfig jsonConfig) void
JSONObject.Property.set
(Object bean, Object value, JsonConfig jsonConfig) void
JSONObject.PropertyOnMap.set
(Object bean, Object value, JsonConfig jsonConfig) void
JSONObject.PropertySetterStrategyDecorator.set
(Object bean, Object value, JsonConfig jsonConfig) private JSONObject
JSONObject.setInternal
(String key, Object value, JsonConfig jsonConfig) Put a key/value pair in the JSONObject.private static void
JSONObject.setProperty
(Object bean, String key, Object value, JsonConfig jsonConfig) Sets a property on the target bean.
Bean may be a Map or a POJO.private static void
JSONObject.setValue
(JSONObject jsonObject, String key, Object value, Class type, JsonConfig jsonConfig, boolean bypass) static Object
JSONArray.toArray
(JSONArray jsonArray, Object root, JsonConfig jsonConfig) Creates a java array from a JSONArray.static Object
JSONArray.toArray
(JSONArray jsonArray, JsonConfig jsonConfig) Creates a java array from a JSONArray.static Object
JSONObject.toBean
(JSONObject jsonObject, Object bean, JsonConfig jsonConfig) Creates a bean from a JSONObject, with the specific configuration.static Object
JSONObject.toBean
(JSONObject jsonObject, JsonConfig jsonConfig) Creates a bean from a JSONObject, with the specific configuration.static Collection
JSONArray.toCollection
(JSONArray jsonArray, JsonConfig jsonConfig) Returns a List or a Set taking generics into account.
Contributed by [Matt Small @ WaveMaker].static Object
JSONSerializer.toJava
(JSON json, JsonConfig jsonConfig) Transform a JSON value to a java object.
Depending on the configured values for conversion this will return a DynaBean, a bean, a List, or and array.static JSON
JSONSerializer.toJSON
(Object object, JsonConfig jsonConfig) Creates a JSONObject, JSONArray or a JSONNull from object.
Accepts JSON formatted strings, Maps, arrays, Collections, DynaBeans and JavaBeans.private static JSON
JSONSerializer.toJSON
(String string, JsonConfig jsonConfig) Creates a JSONObject, JSONArray or a JSONNull from a JSONString.private static JSON
JSONSerializer.toJSON
(JSONString string, JsonConfig jsonConfig) Creates a JSONObject, JSONArray or a JSONNull from a JSONString.static List
JSONArray.toList
(JSONArray jsonArray, Object root, JsonConfig jsonConfig) Creates a List from a JSONArray.static List
JSONArray.toList
(JSONArray jsonArray, JsonConfig jsonConfig) Deprecated.replaced by toCollection -
Uses of JsonConfig in net.sf.json.processors
Methods in net.sf.json.processors with parameters of type JsonConfigModifier and TypeMethodDescriptionprivate Object
JsDateJsonValueProcessor.process
(Object value, JsonConfig jsonConfig) JsDateJsonValueProcessor.processArrayValue
(Object value, JsonConfig jsonConfig) JsonValueProcessor.processArrayValue
(Object value, JsonConfig jsonConfig) Processes the value an returns a suitable JSON value.JsDateJsonBeanProcessor.processBean
(Object bean, JsonConfig jsonConfig) Processes the input bean into a compatible JsDate.JsonBeanProcessor.processBean
(Object bean, JsonConfig jsonConfig) Processes the bean an returns a suitable JSONObject representation.JsDateJsonValueProcessor.processObjectValue
(String key, Object value, JsonConfig jsonConfig) JsonValueProcessor.processObjectValue
(String key, Object value, JsonConfig jsonConfig) Processes the value an returns a suitable JSON value. -
Uses of JsonConfig in net.sf.json.util
Methods in net.sf.json.util with parameters of type JsonConfigModifier and TypeMethodDescriptionprivate void
PropertySetStrategy.DefaultPropertySetStrategy._setProperty
(Object bean, String key, Object value, JsonConfig jsonConfig) static String
JSONUtils.convertToJavaIdentifier
(String key, JsonConfig jsonConfig) Transforms the string into a valid Java Identifier.
The default strategy is JavaIdentifierTransformer.NOOPstatic boolean
JSONUtils.isJsonKeyword
(String input, JsonConfig jsonConfig) static org.apache.commons.beanutils.DynaBean
JSONUtils.newDynaBean
(JSONObject jsonObject, JsonConfig jsonConfig) Creates a new MorphDynaBean from a JSONObject.JSONTokener.nextValue
(JsonConfig jsonConfig) Get the next value.void
PropertySetStrategy.DefaultPropertySetStrategy.setProperty
(Object bean, String key, Object value, JsonConfig jsonConfig) void
PropertySetStrategy.setProperty
(Object bean, String key, Object value, JsonConfig jsonConfig)