| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
decode(String json,
Class<T> valueType)
将json反序列化成对象
|
static <T> T |
decode(String json,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
将json反序列化为对象
|
static String |
encode(Object obj)
对象序列化
|
static String |
encode(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
Object obj)
对象序列化
|
public static String encode(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Object obj)
objectMapper - ObjectMapperobj - objpublic static <T> T decode(String json, Class<T> valueType)
json - jsonvalueType - Classpublic static <T> T decode(String json, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
json - jsontypeReference - TypeReferenceCopyright © 2025. All rights reserved.