|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use JSON | |
---|---|
net.sf.json | The core of the library |
net.sf.json.groovy | Groovy support |
net.sf.json.test | Testing utilities |
net.sf.json.util | Miscelaneous utilities |
net.sf.json.xml | Utilities for trasforming JSON to XML and back. |
Uses of JSON in net.sf.json |
---|
Classes in net.sf.json that implement JSON | |
---|---|
class |
JSONArray
A JSONArray is an ordered sequence of values. |
class |
JSONNull
JSONNull is equivalent to the value that JavaScript calls null, whilst Java's null is equivalent to the value that JavaScript calls undefined. |
class |
JSONObject
A JSONObject is an unordered collection of name/value pairs. |
Methods in net.sf.json that return JSON | |
---|---|
static JSON |
JSONSerializer.toJSON(Object object)
Creates a JSONObject, JSONArray or a JSONNull from object. Accepts JSON formatted strings, Maps, arrays, Collections, DynaBeans and JavaBeans. |
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. |
Methods in net.sf.json with parameters of type JSON | |
---|---|
static Object |
JSONSerializer.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 |
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. |
Uses of JSON in net.sf.json.groovy |
---|
Methods in net.sf.json.groovy that return JSON | |
---|---|
JSON |
JsonSlurper.parse(File file)
|
JSON |
JsonSlurper.parse(InputStream input)
|
JSON |
JsonSlurper.parse(Reader reader)
|
JSON |
JsonSlurper.parse(String uri)
|
JSON |
JsonSlurper.parse(URL url)
|
JSON |
JsonSlurper.parseText(String text)
|
Uses of JSON in net.sf.json.test |
---|
Methods in net.sf.json.test with parameters of type JSON | |
---|---|
static void |
JSONAssert.assertEquals(JSON expected,
JSON actual)
Asserts that two JSON values are equal. |
static void |
JSONAssert.assertEquals(String message,
JSON expected,
JSON actual)
Asserts that two JSON values are equal. |
static void |
JSONAssert.assertNotNull(JSON json)
Asserts that a JSON value is not null. Fails if: JSONNull.getInstance().equals( json ) ((JSONObject) json).isNullObject() |
static void |
JSONAssert.assertNotNull(String message,
JSON json)
Asserts that a JSON value is not null. Fails if: JSONNull.getInstance().equals( json ) ((JSONObject) json).isNullObject() |
static void |
JSONAssert.assertNull(JSON json)
Asserts that a JSON value is null. Fails if: !JSONNull.getInstance().equals( json ) !((JSONObject) json).isNullObject() |
static void |
JSONAssert.assertNull(String message,
JSON json)
Asserts that a JSON value is null. Fails if: !JSONNull.getInstance().equals( json ) !((JSONObject) json).isNullObject() |
Uses of JSON in net.sf.json.util |
---|
Methods in net.sf.json.util with parameters of type JSON | |
---|---|
static String |
WebUtils.protect(JSON json)
Transforms the input Json string using the configured WebHijackPreventionStrategy. |
static String |
WebUtils.protect(JSON json,
boolean shrink)
Transforms the input Json string using the configured WebHijackPreventionStrategy. |
static String |
WebUtils.toString(JSON json)
Returns a string represenation of a JSON value. When an object property name does not contain a space (' ') or a colon (':'), the quotes are omitted. |
Uses of JSON in net.sf.json.xml |
---|
Methods in net.sf.json.xml that return JSON | |
---|---|
JSON |
XMLSerializer.read(String xml)
Creates a JSON value from a XML string. |
JSON |
XMLSerializer.readFromFile(File file)
Creates a JSON value from a File. |
JSON |
XMLSerializer.readFromFile(String path)
Creates a JSON value from a File. |
JSON |
XMLSerializer.readFromStream(InputStream stream)
Creates a JSON value from an input stream. |
Methods in net.sf.json.xml with parameters of type JSON | |
---|---|
String |
XMLSerializer.write(JSON json)
Writes a JSON value into a XML string with UTF-8 encoding. |
String |
XMLSerializer.write(JSON json,
String encoding)
Writes a JSON value into a XML string with an specific encoding. If the encoding string is null it will use UTF-8. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |