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 |
static org.codehaus.jackson.map.ObjectMapper |
sysPropertiesAwareMapper |
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(InputStream bytes,
Class<T> type,
boolean replaceSystemProperties) |
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 final org.codehaus.jackson.map.ObjectMapper sysPropertiesAwareMapper
public static void writeValueToStream(OutputStream os, Object obj) throws IOException
IOException
public static String writeValueAsString(Object obj) throws IOException
IOException
public static byte[] writeValueAsBytes(Object obj) throws IOException
IOException
public static <T> T readValue(byte[] bytes, Class<T> type) throws IOException
IOException
public static <T> T readValue(String bytes, Class<T> type) throws IOException
IOException
public static <T> T readValue(InputStream bytes, Class<T> type) throws IOException
IOException
public static <T> T readValue(InputStream bytes, Class<T> type, boolean replaceSystemProperties) throws IOException
IOException
Copyright © 2014. All Rights Reserved.