public final class JacksonUtils extends Object
This class provides a custom JsonNodeFactory
and ObjectMapper
which you should use preferably to your own (in particular,
the mapper ensures that decimal values are read using BigDecimal
.
It also provides a method for returning an empty ObjectNode
(for all practical purposes, an empty schema), and one to convert a JSON
object into a Map
.
Modifier and Type | Method and Description |
---|---|
static Map<String,JsonNode> |
asMap(JsonNode node)
Return a map out of an object's members
|
static JsonNode |
emptyObject() |
static ObjectMapper |
getMapper() |
static JsonNodeFactory |
nodeFactory() |
public static ObjectMapper getMapper()
public static JsonNodeFactory nodeFactory()
public static JsonNode emptyObject()
Copyright © 2013. All Rights Reserved.