|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JsonContext
Converts objects to and from JSON format.
Method Summary | ||
---|---|---|
boolean |
isSupportedType(Type genericType)
Return true if the type is known as an Entity or Xml type or a List Set or Map of known bean types. |
|
|
toBean(Class<T> rootType,
Reader json)
Convert json reader input into a Bean of a specific type. |
|
|
toBean(Class<T> rootType,
Reader json,
JsonReadOptions options)
Convert json reader input into a Bean of a specific type with options. |
|
|
toBean(Class<T> rootType,
String json)
Convert json string input into a Bean of a specific type. |
|
|
toBean(Class<T> rootType,
String json,
JsonReadOptions options)
Convert json string input into a Bean of a specific type with options. |
|
String |
toJsonString(Object o)
Convert a bean or collection to json string using default options. |
|
String |
toJsonString(Object o,
boolean pretty)
Convert a bean or collection to json string with pretty format using default options. |
|
String |
toJsonString(Object o,
boolean pretty,
JsonWriteOptions options)
Convert a bean or collection to json string using options. |
|
String |
toJsonString(Object o,
boolean pretty,
JsonWriteOptions options,
String callback)
Convert a bean or collection to json string using a JSONP callback. |
|
void |
toJsonWriter(Object o,
Writer writer)
Write the bean or collection in JSON format to the writer with default options. |
|
void |
toJsonWriter(Object o,
Writer writer,
boolean pretty)
With additional pretty output option. |
|
void |
toJsonWriter(Object o,
Writer writer,
boolean pretty,
JsonWriteOptions options)
With additional options to specify JsonValueAdapter and JsonWriteBeanVisitor's. |
|
void |
toJsonWriter(Object o,
Writer writer,
boolean pretty,
JsonWriteOptions options,
String callback)
With additional JSONP callback function. |
|
|
toList(Class<T> rootType,
Reader json)
Convert json reader input into a list of beans of a specific type. |
|
|
toList(Class<T> rootType,
Reader json,
JsonReadOptions options)
Convert json reader input into a list of beans of a specific type with options. |
|
|
toList(Class<T> rootType,
String json)
Convert json string input into a list of beans of a specific type. |
|
|
toList(Class<T> rootType,
String json,
JsonReadOptions options)
Convert json string input into a list of beans of a specific type with options. |
|
Object |
toObject(Type genericType,
Reader json,
JsonReadOptions options)
Use the genericType to determine if this should be converted into a List or bean. |
|
Object |
toObject(Type genericType,
String json,
JsonReadOptions options)
Use the genericType to determine if this should be converted into a List or bean. |
Method Detail |
---|
<T> T toBean(Class<T> rootType, String json)
<T> T toBean(Class<T> rootType, Reader json)
<T> T toBean(Class<T> rootType, String json, JsonReadOptions options)
<T> T toBean(Class<T> rootType, Reader json, JsonReadOptions options)
<T> List<T> toList(Class<T> rootType, String json)
<T> List<T> toList(Class<T> rootType, String json, JsonReadOptions options)
<T> List<T> toList(Class<T> rootType, Reader json)
<T> List<T> toList(Class<T> rootType, Reader json, JsonReadOptions options)
Object toObject(Type genericType, Reader json, JsonReadOptions options)
Object toObject(Type genericType, String json, JsonReadOptions options)
void toJsonWriter(Object o, Writer writer)
o
- the bean or collection of beans to writewriter
- used to write the json output tovoid toJsonWriter(Object o, Writer writer, boolean pretty)
void toJsonWriter(Object o, Writer writer, boolean pretty, JsonWriteOptions options)
o
- the bean or collection of beans to writewriter
- used to write the json output tooptions
- additional options to control the JSON outputvoid toJsonWriter(Object o, Writer writer, boolean pretty, JsonWriteOptions options, String callback)
String toJsonString(Object o)
String toJsonString(Object o, boolean pretty)
String toJsonString(Object o, boolean pretty, JsonWriteOptions options)
String toJsonString(Object o, boolean pretty, JsonWriteOptions options, String callback)
boolean isSupportedType(Type genericType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |