Package com.adaptris.core.json
Class JsonUtil
java.lang.Object
com.adaptris.core.json.JsonUtil
Utility methods.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionTurn a flat JSON object into a map.mapifyJson
(AdaptrisMessage msg, NullConverter nc) Turn a flat JSON object into a map.
-
Constructor Details
-
JsonUtil
public JsonUtil()
-
-
Method Details
-
mapifyJson
Turn a flat JSON object into a map.- Parameters:
msg
- the AdaptrisMessage- Returns:
- a Map of strings.
- Throws:
IOException
- See Also:
-
mapifyJson
public static Map<String,String> mapifyJson(AdaptrisMessage msg, NullConverter nc) throws IOException Turn a flat JSON object into a map.Nested JSON values are rendered as a string using
JsonNode#toString()
.- Parameters:
msg
- the AdaptrisMessagenc
- theNullConverter
implementation to use in the event of aNullNode
; if null thenNullNode#asText()
is used (which returns "null" as opposed tonull
).- Returns:
- a Map of strings.
- Throws:
IOException
-