public final class JsonHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
getElement(com.fasterxml.jackson.databind.JsonNode json,
java.lang.String name)
Return the field with name in JSON as a string, a boolean, a number or a node.
|
static com.fasterxml.jackson.databind.JsonNode |
getFirstNode(java.lang.String text)
Return the first node of a JSON response.
|
static com.fasterxml.jackson.databind.JsonNode |
getFirstNode(java.lang.String text,
java.lang.String path)
Return the first node of a JSON response.
|
static com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
static java.lang.String |
toJSONString(java.lang.Object obj)
Returns the JSON string for the object.
|
public static com.fasterxml.jackson.databind.JsonNode getFirstNode(java.lang.String text)
text - JSON textpublic static com.fasterxml.jackson.databind.JsonNode getFirstNode(java.lang.String text,
java.lang.String path)
text - JSON textpath - path to find the first nodepublic static java.lang.Object getElement(com.fasterxml.jackson.databind.JsonNode json,
java.lang.String name)
json - jsonname - node namepublic static java.lang.String toJSONString(java.lang.Object obj)
obj - the objectpublic static com.fasterxml.jackson.databind.ObjectMapper getMapper()
Copyright © 2018. All Rights Reserved.