| Modifier and Type | Method and Description |
|---|---|
static JsonUtilImpl |
getInstance()
This method provides a global access point to the instance of the JsonUtilImpl class.
|
<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.
|
public String jsonEncode(Object o)
jsonEncode in interface JsonUtilo - The object to encode.public <T> T jsonDecode(String json, Class<T> clazz)
jsonDecode in interface JsonUtilT - The type of the object.json - The JSON string to decode.clazz - The class of the object.public <T> List<T> jsonDecodeToList(String json, Class<T[]> clazz)
jsonDecodeToList in interface JsonUtilT - The type of the objects.json - The JSON string to decode.clazz - The class of the objects.public static JsonUtilImpl getInstance()
Copyright © 2018–2024. All rights reserved.