public class JsonSerialization extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.codehaus.jackson.map.ObjectMapper |
mapper |
static org.codehaus.jackson.map.ObjectMapper |
prettyMapper |
| Constructor and Description |
|---|
JsonSerialization() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
readValue(byte[] bytes,
Class<T> type) |
static <T> T |
readValue(InputStream bytes,
Class<T> type) |
static <T> T |
readValue(String bytes,
Class<T> type) |
static byte[] |
writeValueAsBytes(Object obj) |
static String |
writeValueAsString(Object obj) |
static void |
writeValueToStream(OutputStream os,
Object obj) |
public static final org.codehaus.jackson.map.ObjectMapper mapper
public static final org.codehaus.jackson.map.ObjectMapper prettyMapper
public static void writeValueToStream(OutputStream os, Object obj) throws IOException
IOExceptionpublic static String writeValueAsString(Object obj) throws IOException
IOExceptionpublic static byte[] writeValueAsBytes(Object obj) throws IOException
IOExceptionpublic static <T> T readValue(byte[] bytes,
Class<T> type)
throws IOException
IOExceptionpublic static <T> T readValue(String bytes, Class<T> type) throws IOException
IOExceptionpublic static <T> T readValue(InputStream bytes, Class<T> type) throws IOException
IOExceptionCopyright © 2014. All Rights Reserved.