|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.foundation.json.ObjectDecoder
public class ObjectDecoder
A producer of some class of Java objects from JSON-encoded object descriptors.
| Method Summary | |
|---|---|
static Object |
decode(Class baseType,
JSONObject jsonObj)
A simple JSON object decoder for one-shot objects. |
static Object |
decode(Class baseType,
JSONObject obj,
TypeResolver resolver)
Produce the Java object described by a particular JSON object descriptor. |
static Object |
decode(Class baseType,
String str)
A simple JSON string decoder for one-shot objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Object decode(Class baseType,
JSONObject obj,
TypeResolver resolver)
baseType - The desired class of the resulting Java object. The
result will not necessarily be of this class, but will be assignable
to a variable of this class.obj - The parsed JSON object descriptor to be decoded.resolver - An object mapping type tag strings to Java classes.
public static Object decode(Class baseType,
JSONObject jsonObj)
decode(Class,JSONObject,TypeResolver) method, using the
StaticTypeResolver to resolve type tags.
baseType - The desired class of the resulting Java object. The
result will not necessarily be of this class, but will be assignable
to a variable of this class.jsonObj - A JSON object describing the object to decode.
public static Object decode(Class baseType,
String str)
decode(Class,JSONObject,TypeResolver) method, using the StaticTypeResolver to resolve type tags.
baseType - The desired class of the resulting Java object. The
result will not necessarily be of this class, but will be assignable
to a variable of this class.str - A JSON string describing the object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||