public class JsonUtils extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static Pattern |
dotWithPreviousChar |
We need to ignore "\." when splitting path.
|
| Constructor | Description |
|---|---|
JsonUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static Node |
convertToJson(Object source,
String label) |
Converts object to JSON.
|
static Node |
convertToJson(Object source,
String label,
boolean lenient) |
Converts object to JSON.
|
static Node |
getNode(Object root,
String path) |
Returns node with given path.
|
static boolean |
nodeAbsent(Object json,
String path,
Configuration configuration) |
|
static boolean |
nodeExists(Object json,
String path) |
Deprecated.
|
public static final Pattern dotWithPreviousChar
public static Node convertToJson(Object source, String label)
source - label - label to be logged in case of error.public static Node convertToJson(Object source, String label, boolean lenient)
source - label - label to be logged in case of error.lenient - lenient parser used for expected values. Allows unquoted keys.public static Node getNode(Object root, String path)
root - path - @Deprecated public static boolean nodeExists(Object json, String path)
public static boolean nodeAbsent(Object json, String path, Configuration configuration)
Copyright © 2018. All rights reserved.