|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.internet2.middleware.grouperClientExt.util.JsonUtils
public class JsonUtils
| Constructor Summary | |
|---|---|
JsonUtils()
|
|
| Method Summary | |
|---|---|
static Object |
jsonConvertFrom(Map<String,Class<?>> conversionMap,
String json)
convert an object from json. |
static Object |
jsonConvertFrom(String json,
Class<?> theClass)
convert an object from json. |
static String |
jsonConvertTo(Object object)
convert an object to json. |
static void |
jsonConvertTo(Object object,
Writer writer)
convert an object to json. |
static String |
jsonConvertToNoWrap(Object object)
convert an object to json without wrapping it with the simple class name. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonUtils()
| Method Detail |
|---|
public static Object jsonConvertFrom(Map<String,Class<?>> conversionMap,
String json)
conversionMap - is the class simple name to class of objects which are allowed to be brought back.
Note: only the top level object needs to be registeredjson -
public static Object jsonConvertFrom(String json,
Class<?> theClass)
json - is the json string, not wrapped with a simple class nametheClass - is the class that the object should be coverted into.
Note: only the top level object needs to be registered
public static String jsonConvertTo(Object object)
object -
public static void jsonConvertTo(Object object,
Writer writer)
object - writer - public static String jsonConvertToNoWrap(Object object)
object -
public static void main(String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||