public final class JacksonUtils extends Object
This class provides a custom JsonNodeFactory and ObjectReader which you should use preferably to your own (in particular,
the reader ensures that decimal values are read using BigDecimal.
| Modifier and Type | Method and Description |
|---|---|
static Map<String,JsonNode> |
asMap(JsonNode node)
Return a map out of an object's members
|
static ObjectReader |
getReader()
Return a preconfigured
ObjectReader to read JSON inputs |
static JsonNodeFactory |
nodeFactory()
Return a preconfigured
JsonNodeFactory to generate JSON data as
JsonNodes |
static String |
prettyPrint(JsonNode node)
Pretty print a JSON value
|
public static ObjectReader getReader()
ObjectReader to read JSON inputspublic static JsonNodeFactory nodeFactory()
JsonNodeFactory to generate JSON data as
JsonNodespublic static Map<String,JsonNode> asMap(JsonNode node)
If the node given as an argument is not a map, an empty map is returned.
node - the nodeCopyright © 2013. All Rights Reserved.