public interface JsonUtil
| Modifier and Type | Method and Description |
|---|---|
<T> T |
jsonDecode(String json,
Class<T> clazz)
Decodes a JSON string into an object of the specified class.
|
<T> List<T> |
jsonDecodeToList(String json,
Class<T[]> clazz)
Decodes a JSON string into a list of objects of the specified class.
|
String |
jsonEncode(Object o)
Encodes an object into a JSON string.
|
String jsonEncode(Object o)
o - The object to encode.<T> T jsonDecode(String json, Class<T> clazz)
T - The type of the object.json - The JSON string.clazz - The class of the object.Copyright © 2018–2024. All rights reserved.