public final class JsonUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
createDmcObjectMapper()
DMC反序列化默认返回时间戳
|
static com.fasterxml.jackson.databind.ObjectMapper |
createObjectMapper() |
static com.fasterxml.jackson.databind.ObjectMapper |
createRedisObjectMapper() |
static <T> T |
jsonToObj(InputStream json,
Class<T> classType) |
static <T> T |
jsonToObj(InputStream json,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) |
static <T> T |
jsonToObj(String json,
Class<T> classType) |
static <T> T |
jsonToObj(String json,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) |
static <T> String |
objToJson(T obj) |
static <T> Map<String,String> |
objToMap(T obj) |
static <T> T |
readValue(InputStream json,
Class<T> valueType) |
static <T> T |
readValue(InputStream json,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) |
static <T> T |
readValue(String json,
Class<T> classType) |
static <T> T |
readValue(String json,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) |
static <T> Map<String,String> |
writeToMap(T obj) |
static <T> String |
writeValue(T obj) |
public static <T> String objToJson(T obj)
public static <T> String writeValue(T obj)
public static <T> T jsonToObj(String json, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
public static <T> T jsonToObj(InputStream json, Class<T> classType)
public static <T> T jsonToObj(InputStream json, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
public static <T> T readValue(String json, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
public static <T> T readValue(InputStream json, Class<T> valueType)
public static <T> T readValue(InputStream json, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper()
public static com.fasterxml.jackson.databind.ObjectMapper createDmcObjectMapper()
public static com.fasterxml.jackson.databind.ObjectMapper createRedisObjectMapper()
Copyright © 2024. All rights reserved.