Class JSONUtils
- java.lang.Object
-
- com.alibaba.nacos.config.server.utils.JSONUtils
-
public class JSONUtils extends Object
json util- Author:
- Nacos
-
-
Constructor Summary
Constructors Constructor Description JSONUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TdeserializeObject(InputStream src, com.fasterxml.jackson.core.type.TypeReference<?> typeReference)static <T> TdeserializeObject(String s, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)static ObjectdeserializeObject(String s, Class<?> clazz)static StringserializeObject(Object o)
-
-
-
Method Detail
-
serializeObject
public static String serializeObject(Object o) throws IOException
- Throws:
IOException
-
deserializeObject
public static Object deserializeObject(String s, Class<?> clazz) throws IOException
- Throws:
IOException
-
deserializeObject
public static <T> T deserializeObject(String s, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) throws IOException
- Throws:
IOException
-
deserializeObject
public static <T> T deserializeObject(InputStream src, com.fasterxml.jackson.core.type.TypeReference<?> typeReference) throws IOException
- Throws:
IOException
-
-