Class JSONUtil
- java.lang.Object
-
- fr.paris.lutece.plugins.rest.util.json.JSONUtil
-
public final class JSONUtil extends Object
JSON Utils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringformatError(String strMessage, int nCode)Format error as JSONstatic com.fasterxml.jackson.databind.node.ObjectNodejson(Map model)Convert a model into a JSON objectstatic Stringmodel2Json(Map model)Convert a model into a JSON formatted string
-
-
-
Method Detail
-
model2Json
public static String model2Json(Map model)
Convert a model into a JSON formatted string- Parameters:
model- The model- Returns:
- The JSON string
-
json
public static com.fasterxml.jackson.databind.node.ObjectNode json(Map model)
Convert a model into a JSON object- Parameters:
model- The model- Returns:
- The JSON Object
-
-