Package xyz.juandiii.commons.utils
Class ConvertJson
- java.lang.Object
-
- xyz.juandiii.commons.utils.ConvertJson
-
public class ConvertJson extends Object
-
-
Constructor Summary
Constructors Constructor Description ConvertJson()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TfromJson(Object object, Class<T> tClass)Convert JsonObject to Object Classstatic StringtoJson(Object obj)Convert Object to string JSONstatic Map<String,Object>toMap(Object obj)Convert Object to Map
-
-
-
Method Detail
-
toMap
public static Map<String,Object> toMap(Object obj) throws Exception
Convert Object to Map- Parameters:
obj- Object- Returns:
- Object
- Throws:
Exception- Throw exception
-
toJson
public static String toJson(Object obj) throws Exception
Convert Object to string JSON- Parameters:
obj- Object- Returns:
- String
- Throws:
Exception- Throw exception
-
-