|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.server.http.rest.JSONUtil
public final class JSONUtil
The JSONUtil
is an internal utility class for REST handling.
Method Summary | ||
---|---|---|
static org.codehaus.jackson.map.ObjectMapper |
createObjectMapper()
Creates a new ObjectMapper with preconfigured settings. |
|
static PrintStream |
getDumpStream()
Gets the dump stream. |
|
static Object |
getObject(org.restlet.representation.Representation pRepresentation)
Gets the result object from a representation. |
|
static
|
getObject(org.restlet.representation.Representation pRepresentation,
Class pClass)
Gets the result object from a representation. |
|
static boolean |
isDumpStreamEnabled()
Gets whether JSTOM stream dumping is enabled. |
|
static void |
setDumpStream(PrintStream pStream)
Sets the dump stream. |
|
static void |
setDumpStreamEnabled(boolean pDump)
Sets whether the JSON stream should be dumped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.codehaus.jackson.map.ObjectMapper createObjectMapper()
ObjectMapper
with preconfigured settings.
public static Object getObject(org.restlet.representation.Representation pRepresentation) throws IOException
pRepresentation
- the object representation
IOException
- if object creation failspublic static <T> T getObject(org.restlet.representation.Representation pRepresentation, Class pClass) throws IOException
T
- the result object typepRepresentation
- the object representationpClass
- the expected class type
IOException
- if object creation failspublic static void setDumpStreamEnabled(boolean pDump)
pDump
- true
to enable dumps, false
otherwisepublic static boolean isDumpStreamEnabled()
true
if stream dumping is enabled, false
otherwisepublic static void setDumpStream(PrintStream pStream)
pStream
- the stream or null
to reset the stream to its default value (System.out)public static PrintStream getDumpStream()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |