public class JacksonUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
fromJson(String json,
Class<T> valueType)
将json string反序列化成对象
|
static <T> T |
fromJson(String json,
Type valueType)
将json string反序列化成对象
|
static <T> T |
fromJson(String json,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
将json 反序列化为对象
|
static String |
toJson(Object obj) |
public static <T> T fromJson(String json, Class<T> valueType)
json - valueType - public static <T> T fromJson(String json, Type valueType)
json - valueType - public static <T> T fromJson(String json, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
json - typeReference - Copyright © 2019. All rights reserved.