public class JSONSerializer extends Object
| Constructor and Description |
|---|
JSONSerializer() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
toJava(JSON json)
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 Object |
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 |
toJSON(Object object)
Creates a JSONObject, JSONArray or a JSONNull from object.
Accepts JSON formatted strings, Maps, arrays, Collections, DynaBeans and JavaBeans. |
static JSON |
toJSON(Object object,
JsonConfig jsonConfig)
Creates a JSONObject, JSONArray or a JSONNull from object.
Accepts JSON formatted strings, Maps, arrays, Collections, DynaBeans and JavaBeans. |
public static Object toJava(JSON json)
json - a JSON valuepublic static Object toJava(JSON json, JsonConfig jsonConfig)
json - a JSON valuejsonConfig - additional configurationpublic static JSON toJSON(Object object)
object - any java ObjectJSONException - if the object can not be convertedpublic static JSON toJSON(Object object, JsonConfig jsonConfig)
object - any java ObjectjsonConfig - additional configurationJSONException - if the object can not be converted