public interface JsonAdapter
| Modifier and Type | Method and Description |
|---|---|
default <T> T |
convertValue(Object fromValue,
Class<T> toValueType)
对象类型转换
|
default <T> T |
convertValue(Object fromValue,
Type toValueType)
对象类型转换
|
default <T> List<T> |
readList(byte[] json,
Class<T> clazz)
将 json byte array 转成对象
|
<T> List<T> |
readList(String json,
Class<T> clazz)
将 json 字符串转成对象
|
default <T> T |
readValue(byte[] json,
Class<T> clazz)
将 json byte array 转成对象
|
default <T> T |
readValue(byte[] json,
Type type)
将 json byte array 转成对象
|
<T> T |
readValue(String json,
Class<T> clazz)
将 json 字符串转成对象
|
<T> T |
readValue(String json,
Type type)
将 json 字符串转成对象
|
default byte[] |
toJsonBytes(Object object)
转换成 json byte array
|
String |
toJsonString(Object object)
转换成 json 字符串
|
String toJsonString(Object object)
object - objectdefault byte[] toJsonBytes(Object object)
object - object<T> T readValue(String json, Class<T> clazz)
T - 泛型json - jsonclazz - Class<T> T readValue(String json, Type type)
T - 泛型json - jsontype - Typedefault <T> T readValue(byte[] json,
Class<T> clazz)
T - 泛型json - jsonclazz - Classdefault <T> T readValue(byte[] json,
Type type)
T - 泛型json - jsontype - Type<T> List<T> readList(String json, Class<T> clazz)
T - 泛型json - jsonclazz - Classdefault <T> List<T> readList(byte[] json, Class<T> clazz)
T - 泛型json - jsonclazz - Classdefault <T> T convertValue(Object fromValue, Class<T> toValueType)
T - 泛型fromValue - fromValuetoValueType - toValueTypeCopyright © 2025. All rights reserved.