net.sf.json
public class JSONSerializer extends java.lang.Object
Constructor and Description |
---|
JSONSerializer() |
Modifier and Type | Method and Description |
---|---|
static java.lang.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 java.lang.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(java.lang.Object object)
Creates a JSONObject, JSONArray or a JSONNull from object.
|
static JSON |
toJSON(java.lang.Object object,
JsonConfig jsonConfig)
Creates a JSONObject, JSONArray or a JSONNull from object.
|
public static java.lang.Object toJava(JSON json)
json
- a JSON valuepublic static java.lang.Object toJava(JSON json, JsonConfig jsonConfig)
json
- a JSON valuejsonConfig
- additional configurationpublic static JSON toJSON(java.lang.Object object)
object
- any java ObjectJSONException
- if the object can not be convertedpublic static JSON toJSON(java.lang.Object object, JsonConfig jsonConfig)
object
- any java ObjectjsonConfig
- additional configurationJSONException
- if the object can not be convertedCopyright © 2006-2014 Json-lib. All Rights Reserved.