Class MapperJsonUtil
- java.lang.Object
-
- fr.paris.lutece.plugins.releaser.util.MapperJsonUtil
-
public final class MapperJsonUtil extends Object
JSON Mapper utils.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetJson(Object object)parse a bean into a json.static <T> Tparse(String strJson, Class<T> t)parse the JSON for a bean.
-
-
-
Method Detail
-
parse
public static <T> T parse(String strJson, Class<T> t) throws IOException
parse the JSON for a bean.- Type Parameters:
T- The Bean class- Parameters:
strJson- The JSONt- The bean class- Returns:
- The bean
- Throws:
IOException- if an error occurs
-
getJson
public static String getJson(Object object) throws IOException
parse a bean into a json.- Parameters:
object- the object- Returns:
- The json
- Throws:
IOException- if an error occurs
-
-