public final class JacksonUtils extends Object
A small set of utility methods over Jackson.
| Modifier and Type | Class and Description |
|---|---|
private static class |
JacksonUtils.EmptySchema |
| Modifier and Type | Field and Description |
|---|---|
private static JsonNode |
EMPTY_SCHEMA |
| Modifier | Constructor and Description |
|---|---|
private |
JacksonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static JsonNode |
emptySchema()
Return an empty schema
|
static Set<String> |
fieldNames(JsonNode node)
Return a set of field names in an object instance
|
static Map<String,JsonNode> |
nodeToMap(JsonNode node)
Return a map out of an object instance
|
static SortedMap<String,JsonNode> |
nodeToTreeMap(JsonNode node)
Return a sorted map out of an object instance
|
private static final JsonNode EMPTY_SCHEMA
public static Map<String,JsonNode> nodeToMap(JsonNode node)
node - the nodepublic static SortedMap<String,JsonNode> nodeToTreeMap(JsonNode node)
This is used by syntax validation especially: it is more convenient to present validation messages in key order.
node - the nodepublic static Set<String> fieldNames(JsonNode node)
node - the nodepublic static JsonNode emptySchema()
Copyright © 2012. All Rights Reserved.