public class JSONTool extends Object
| Constructor and Description |
|---|
JSONTool() |
| Modifier and Type | Method and Description |
|---|---|
net.sf.json.JSON |
parse(String json)
Parse a serialized JSON into a real JSON object.
|
String |
serialize(Object object)
Serialize a Java object to the JSON format.
|
public String serialize(Object object)
Examples:
object - the object to be serialized to the JSON formatpublic net.sf.json.JSON parse(String json)
null is returned.json - the string to parse, must be valid JSONJSONObject or a JSONArray, or
null if the argument is not a valid JSONCopyright © 2004–2016 XWiki. All rights reserved.