|
||||||||||
| 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 void |
configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper pMapper)
Configures the given object mapper. |
|
static com.fasterxml.jackson.databind.ObjectMapper |
createObjectMapper()
Creates a new ObjectMapper with preconfigured settings. |
|
static java.io.PrintStream |
getDumpStream()
Gets the dump stream. |
|
static java.lang.Object |
getObject(org.restlet.representation.Representation pRepresentation)
Gets the result object from a representation. |
|
static
|
getObject(org.restlet.representation.Representation pRepresentation,
java.lang.Class pClass)
Gets the result object from a representation. |
|
static boolean |
isDumpStreamEnabled()
Gets whether JSTOM stream dumping is enabled. |
|
static void |
setDumpStream(java.io.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 com.fasterxml.jackson.databind.ObjectMapper createObjectMapper()
ObjectMapper with preconfigured settings.
public static void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper pMapper)
pMapper - the mapper
public static java.lang.Object getObject(org.restlet.representation.Representation pRepresentation)
throws java.io.IOException
pRepresentation - the object representation
java.io.IOException - if object creation fails
public static <T> T getObject(org.restlet.representation.Representation pRepresentation,
java.lang.Class pClass)
throws java.io.IOException
T - the result object typepRepresentation - the object representationpClass - the expected class type
java.io.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(java.io.PrintStream pStream)
pStream - the stream or null to reset the stream to its default value (System.out)public static java.io.PrintStream getDumpStream()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||