Class JsonMapper
- java.lang.Object
-
- dev.lydtech.component.framework.mapper.JsonMapper
-
public class JsonMapper extends Object
-
-
Constructor Summary
Constructors Constructor Description JsonMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TreadFromJson(String json, Class<T> clazz)Map the given JSON String to the required class type.static StringwriteToJson(Object obj)Map the given Object to a JSON String.
-
-
-
Method Detail
-
readFromJson
public static <T> T readFromJson(String json, Class<T> clazz) throws MappingException
Map the given JSON String to the required class type.- Throws:
MappingException
-
writeToJson
public static String writeToJson(Object obj) throws MappingException
Map the given Object to a JSON String.- Throws:
MappingException
-
-