public class Json extends Object
| Constructor and Description |
|---|
Json() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
asBytes(Object value)
Serialize an object to json.
|
static byte[] |
asBytesUnchecked(Object value)
Serialize an object to json.
|
static String |
asNormalizedString(Object value)
Serialize an object to a json string, ordering fields and omitting null and empty fields.
|
static String |
asNormalizedStringUnchecked(Object value)
Serialize an object to a json string, ordering fields and omitting null and empty fields.
|
static String |
asPrettyString(Object value)
Serialize an object to a json string.
|
static String |
asPrettyStringUnchecked(Object value)
Serialize an object to a json string.
|
static String |
asString(Object value)
Serialize an object to a json string.
|
static String |
asStringUnchecked(Object value)
Serialize an object to a json string.
|
static <T> T |
read(byte[] bytes,
Class<T> clazz) |
static <T> T |
read(byte[] bytes,
com.fasterxml.jackson.databind.JavaType javaType) |
static <T> T |
read(byte[] bytes,
com.fasterxml.jackson.core.type.TypeReference<?> typeReference) |
static <T> T |
read(String content,
Class<T> clazz) |
static <T> T |
read(String content,
com.fasterxml.jackson.databind.JavaType javaType) |
static <T> T |
read(String content,
com.fasterxml.jackson.core.type.TypeReference<?> typeReference) |
static com.fasterxml.jackson.databind.ObjectReader |
reader() |
static com.fasterxml.jackson.databind.JsonNode |
readTree(byte[] bytes) |
static com.fasterxml.jackson.databind.JsonNode |
readTree(File file) |
static com.fasterxml.jackson.databind.JsonNode |
readTree(String content) |
static com.fasterxml.jackson.databind.JsonNode |
readTreeUnchecked(byte[] bytes) |
static com.fasterxml.jackson.databind.JsonNode |
readTreeUnchecked(File file) |
static com.fasterxml.jackson.databind.JsonNode |
readTreeUnchecked(String content) |
static <T> T |
readUnchecked(byte[] bytes,
Class<T> clazz) |
static <T> T |
readUnchecked(byte[] bytes,
com.fasterxml.jackson.databind.JavaType javaType) |
static <T> T |
readUnchecked(byte[] bytes,
com.fasterxml.jackson.core.type.TypeReference<?> typeReference) |
static <T> T |
readUnchecked(String content,
Class<T> clazz) |
static <T> T |
readUnchecked(String content,
com.fasterxml.jackson.databind.JavaType javaType) |
static <T> T |
readUnchecked(String content,
com.fasterxml.jackson.core.type.TypeReference<?> typeReference) |
static com.fasterxml.jackson.databind.MappingIterator<com.fasterxml.jackson.databind.JsonNode> |
readValues(InputStream stream) |
static com.fasterxml.jackson.databind.MappingIterator<Map<String,Object>> |
readValues(InputStream stream,
com.fasterxml.jackson.core.type.TypeReference<Map<String,Object>> typeReference) |
static byte[] |
sha1digest(Map<String,?> o) |
static byte[] |
sha1digest(Object o) |
static com.fasterxml.jackson.databind.JavaType |
type(Type t) |
static com.fasterxml.jackson.databind.JavaType |
type(com.fasterxml.jackson.core.type.TypeReference<?> typeReference) |
static com.fasterxml.jackson.databind.type.TypeFactory |
typeFactory() |
static com.fasterxml.jackson.databind.ObjectWriter |
writer() |
public static byte[] asBytes(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionasBytesUnchecked(Object)public static byte[] asBytesUnchecked(Object value)
asBytes(Object)public static String asString(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionasStringUnchecked(Object)public static String asStringUnchecked(Object value)
asString(Object)public static String asPrettyString(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionasPrettyStringUnchecked(Object)public static String asPrettyStringUnchecked(Object value)
asPrettyString(Object)public static String asNormalizedString(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionasPrettyStringUnchecked(Object)public static String asNormalizedStringUnchecked(Object value)
asPrettyString(Object)public static <T> T read(String content, Class<T> clazz) throws IOException
IOExceptionpublic static <T> T read(String content, com.fasterxml.jackson.core.type.TypeReference<?> typeReference) throws IOException
IOExceptionpublic static <T> T read(String content, com.fasterxml.jackson.databind.JavaType javaType) throws IOException
IOExceptionpublic static <T> T read(byte[] bytes,
Class<T> clazz)
throws IOException
IOExceptionpublic static <T> T read(byte[] bytes,
com.fasterxml.jackson.core.type.TypeReference<?> typeReference)
throws IOException
IOExceptionpublic static <T> T read(byte[] bytes,
com.fasterxml.jackson.databind.JavaType javaType)
throws IOException
IOExceptionpublic static <T> T readUnchecked(String content, com.fasterxml.jackson.core.type.TypeReference<?> typeReference)
public static <T> T readUnchecked(String content, com.fasterxml.jackson.databind.JavaType javaType)
public static <T> T readUnchecked(byte[] bytes,
Class<T> clazz)
public static <T> T readUnchecked(byte[] bytes,
com.fasterxml.jackson.core.type.TypeReference<?> typeReference)
public static <T> T readUnchecked(byte[] bytes,
com.fasterxml.jackson.databind.JavaType javaType)
public static com.fasterxml.jackson.databind.MappingIterator<Map<String,Object>> readValues(InputStream stream, com.fasterxml.jackson.core.type.TypeReference<Map<String,Object>> typeReference) throws IOException
IOExceptionpublic static com.fasterxml.jackson.databind.MappingIterator<com.fasterxml.jackson.databind.JsonNode> readValues(InputStream stream) throws IOException
IOExceptionpublic static com.fasterxml.jackson.databind.JsonNode readTree(byte[] bytes)
throws IOException
IOExceptionpublic static com.fasterxml.jackson.databind.JsonNode readTreeUnchecked(byte[] bytes)
public static com.fasterxml.jackson.databind.JsonNode readTree(String content) throws IOException
IOExceptionpublic static com.fasterxml.jackson.databind.JsonNode readTreeUnchecked(String content)
public static com.fasterxml.jackson.databind.JsonNode readTree(File file) throws IOException
IOExceptionpublic static com.fasterxml.jackson.databind.JsonNode readTreeUnchecked(File file)
public static com.fasterxml.jackson.databind.JavaType type(Type t)
public static com.fasterxml.jackson.databind.JavaType type(com.fasterxml.jackson.core.type.TypeReference<?> typeReference)
public static com.fasterxml.jackson.databind.type.TypeFactory typeFactory()
public static com.fasterxml.jackson.databind.ObjectReader reader()
public static com.fasterxml.jackson.databind.ObjectWriter writer()
public static byte[] sha1digest(Object o) throws IOException
IOExceptionpublic static byte[] sha1digest(Map<String,?> o) throws IOException
IOExceptionCopyright © 2014. All rights reserved.