Class JSONUtil
java.lang.Object
fr.paris.lutece.plugins.rest.util.json.JSONUtil
JSON Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatError(String strMessage, int nCode) Format error as JSONstatic com.fasterxml.jackson.databind.node.ObjectNodeConvert a model into a JSON objectstatic Stringmodel2Json(Map model) Convert a model into a JSON formatted string
-
Method Details
-
model2Json
Convert a model into a JSON formatted string- Parameters:
model- The model- Returns:
- The JSON string
-
json
Convert a model into a JSON object- Parameters:
model- The model- Returns:
- The JSON Object
-
formatError
Format error as JSON- Parameters:
strMessage- the error messagenCode- The error code- Returns:
- The formatted string
-