public class HuToolJsonAdapter extends Object implements JsonAdapter
| Modifier and Type | Field and Description |
|---|---|
static String |
CLAZZ_NAME
类名
|
| Constructor and Description |
|---|
HuToolJsonAdapter() |
HuToolJsonAdapter(cn.hutool.json.JSONConfig jsonConfig) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
convertValue(Object fromValue,
Class<T> toValueType)
对象类型转换
|
<T> T |
convertValue(Object fromValue,
Type toValueType)
对象类型转换
|
<T> List<T> |
readList(String json,
Class<T> clazz)
将 json 字符串转成对象
|
<T> T |
readValue(String json,
Class<T> clazz)
将 json 字符串转成对象
|
<T> T |
readValue(String json,
Type type)
将 json 字符串转成对象
|
String |
toJsonString(Object object)
转换成 json 字符串
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadList, readValue, readValue, toJsonBytespublic static final String CLAZZ_NAME
public HuToolJsonAdapter()
public HuToolJsonAdapter(cn.hutool.json.JSONConfig jsonConfig)
public String toJsonString(Object object)
JsonAdaptertoJsonString in interface JsonAdapterobject - objectpublic <T> T readValue(String json, Class<T> clazz)
JsonAdapterreadValue in interface JsonAdapterT - 泛型json - jsonclazz - Classpublic <T> T readValue(String json, Type type)
JsonAdapterreadValue in interface JsonAdapterT - 泛型json - jsontype - Typepublic <T> List<T> readList(String json, Class<T> clazz)
JsonAdapterreadList in interface JsonAdapterT - 泛型json - jsonclazz - Classpublic <T> T convertValue(Object fromValue, Class<T> toValueType)
JsonAdapterconvertValue in interface JsonAdapterT - 泛型fromValue - fromValuetoValueType - toValueTypepublic <T> T convertValue(Object fromValue, Type toValueType)
JsonAdapterconvertValue in interface JsonAdapterT - 泛型fromValue - fromValuetoValueType - toValueTypeCopyright © 2025. All rights reserved.