Class JsonUtil


  • public class JsonUtil
    extends Object
    • Constructor Detail

      • JsonUtil

        public JsonUtil()
    • Method Detail

      • keys

        public static List<String> keys​(com.fasterxml.jackson.databind.node.ObjectNode json)
      • matchingKeys

        public static List<String> matchingKeys​(String regex,
                                                com.fasterxml.jackson.databind.node.ObjectNode json)
      • getProperty

        public static com.fasterxml.jackson.databind.JsonNode getProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                          String propertyName)
      • setProperty

        public static void setProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                       String propertyName,
                                       com.fasterxml.jackson.databind.JsonNode value)
      • getObjectProperty

        public static com.fasterxml.jackson.databind.node.ObjectNode getObjectProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                       String propertyName)
      • consumeObjectProperty

        public static com.fasterxml.jackson.databind.node.ObjectNode consumeObjectProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                           String propertyName)
      • getAnyProperty

        public static com.fasterxml.jackson.databind.JsonNode getAnyProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                             String propertyName)
      • consumeAnyProperty

        public static com.fasterxml.jackson.databind.JsonNode consumeAnyProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                 String propertyName)
      • getAnyArrayProperty

        public static List<com.fasterxml.jackson.databind.JsonNode> getAnyArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                        String propertyName)
      • consumeAnyArrayProperty

        public static List<com.fasterxml.jackson.databind.JsonNode> consumeAnyArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                            String propertyName)
      • getObjectArrayProperty

        public static List<com.fasterxml.jackson.databind.node.ObjectNode> getObjectArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                                  String propertyName)
      • consumeObjectArrayProperty

        public static List<com.fasterxml.jackson.databind.node.ObjectNode> consumeObjectArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                                      String propertyName)
      • getStringArrayProperty

        public static List<String> getStringArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                          String propertyName)
      • consumeStringArrayProperty

        public static List<String> consumeStringArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                              String propertyName)
      • getIntegerArrayProperty

        public static List<Integer> getIntegerArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                            String propertyName)
      • consumeIntegerArrayProperty

        public static List<Integer> consumeIntegerArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                String propertyName)
      • getNumberArrayProperty

        public static List<Number> getNumberArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                          String propertyName)
      • consumeNumberArrayProperty

        public static List<Number> consumeNumberArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                              String propertyName)
      • getBooleanArrayProperty

        public static List<Boolean> getBooleanArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                            String propertyName)
      • consumeBooleanArrayProperty

        public static List<Boolean> consumeBooleanArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                String propertyName)
      • getStringProperty

        public static String getStringProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                               String propertyName)
      • consumeStringProperty

        public static String consumeStringProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                   String propertyName)
      • getIntegerProperty

        public static Integer getIntegerProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                 String propertyName)
      • consumeIntegerProperty

        public static Integer consumeIntegerProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                     String propertyName)
      • getNumberProperty

        public static Number getNumberProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                               String propertyName)
      • consumeNumberProperty

        public static Number consumeNumberProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                   String propertyName)
      • getBooleanProperty

        public static Boolean getBooleanProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                 String propertyName)
      • consumeBooleanProperty

        public static Boolean consumeBooleanProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                     String propertyName)
      • getAnyMapProperty

        public static Map<String,​com.fasterxml.jackson.databind.JsonNode> getAnyMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                                  String propertyName)
      • consumeAnyMapProperty

        public static Map<String,​com.fasterxml.jackson.databind.JsonNode> consumeAnyMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                                      String propertyName)
      • getObjectMapProperty

        public static Map<String,​com.fasterxml.jackson.databind.node.ObjectNode> getObjectMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                                            String propertyName)
      • consumeObjectMapProperty

        public static Map<String,​com.fasterxml.jackson.databind.node.ObjectNode> consumeObjectMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                                                                String propertyName)
      • getStringMapProperty

        public static Map<String,​String> getStringMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                    String propertyName)
      • consumeStringMapProperty

        public static Map<String,​String> consumeStringMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                        String propertyName)
      • getIntegerMapProperty

        public static Map<String,​Integer> getIntegerMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                      String propertyName)
      • consumeIntegerMapProperty

        public static Map<String,​Integer> consumeIntegerMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                          String propertyName)
      • getNumberMapProperty

        public static Map<String,​Number> getNumberMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                    String propertyName)
      • consumeNumberMapProperty

        public static Map<String,​Number> consumeNumberMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                        String propertyName)
      • getBooleanMapProperty

        public static Map<String,​Boolean> getBooleanMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                      String propertyName)
      • consumeBooleanMapProperty

        public static Map<String,​Boolean> consumeBooleanMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                                          String propertyName)
      • setObjectProperty

        public static void setObjectProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                             String propertyName,
                                             com.fasterxml.jackson.databind.node.ObjectNode value)
      • setAnyProperty

        public static void setAnyProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                          String propertyName,
                                          com.fasterxml.jackson.databind.JsonNode value)
      • setAnyArrayProperty

        public static void setAnyArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                               String propertyName,
                                               List<com.fasterxml.jackson.databind.JsonNode> value)
      • setObjectArrayProperty

        public static void setObjectArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                  String propertyName,
                                                  List<com.fasterxml.jackson.databind.node.ObjectNode> value)
      • setStringArrayProperty

        public static void setStringArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                  String propertyName,
                                                  List<String> value)
      • setIntegerArrayProperty

        public static void setIntegerArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                   String propertyName,
                                                   List<Integer> value)
      • setNumberArrayProperty

        public static void setNumberArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                  String propertyName,
                                                  List<Number> value)
      • setBooleanArrayProperty

        public static void setBooleanArrayProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                   String propertyName,
                                                   List<Boolean> value)
      • setStringProperty

        public static void setStringProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                             String propertyName,
                                             String value)
      • setIntegerProperty

        public static void setIntegerProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                              String propertyName,
                                              Integer value)
      • setNumberProperty

        public static void setNumberProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                             String propertyName,
                                             Number value)
      • setBooleanProperty

        public static void setBooleanProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                              String propertyName,
                                              Boolean value)
      • setAnyMapProperty

        public static void setAnyMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                             String propertyName,
                                             Map<String,​com.fasterxml.jackson.databind.JsonNode> value)
      • setObjectMapProperty

        public static void setObjectMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                String propertyName,
                                                Map<String,​com.fasterxml.jackson.databind.node.ObjectNode> value)
      • setStringMapProperty

        public static void setStringMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                String propertyName,
                                                Map<String,​String> value)
      • setIntegerMapProperty

        public static void setIntegerMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                 String propertyName,
                                                 Map<String,​Integer> value)
      • setNumberMapProperty

        public static void setNumberMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                String propertyName,
                                                Map<String,​Number> value)
      • setBooleanMapProperty

        public static void setBooleanMapProperty​(com.fasterxml.jackson.databind.node.ObjectNode json,
                                                 String propertyName,
                                                 Map<String,​Boolean> value)
      • stringify

        public static String stringify​(com.fasterxml.jackson.databind.JsonNode json)
      • parseJSON

        public static com.fasterxml.jackson.databind.JsonNode parseJSON​(String jsonString)
      • clone

        public static com.fasterxml.jackson.databind.JsonNode clone​(com.fasterxml.jackson.databind.JsonNode json)
      • objectNode

        public static com.fasterxml.jackson.databind.node.ObjectNode objectNode()
      • arrayNode

        public static com.fasterxml.jackson.databind.node.ArrayNode arrayNode()
      • textNode

        public static com.fasterxml.jackson.databind.node.TextNode textNode​(String value)
      • addToArray

        public static void addToArray​(com.fasterxml.jackson.databind.node.ArrayNode array,
                                      com.fasterxml.jackson.databind.JsonNode value)
      • isPropertyDefined

        public static boolean isPropertyDefined​(com.fasterxml.jackson.databind.JsonNode json,
                                                String propertyName)
      • isString

        public static boolean isString​(com.fasterxml.jackson.databind.JsonNode value)
      • isJsonNode

        public static boolean isJsonNode​(com.fasterxml.jackson.databind.JsonNode value)
      • isObjectNode

        public static boolean isObjectNode​(com.fasterxml.jackson.databind.JsonNode value)
      • toString

        public static String toString​(com.fasterxml.jackson.databind.JsonNode value)
      • toJsonNode

        public static com.fasterxml.jackson.databind.JsonNode toJsonNode​(com.fasterxml.jackson.databind.JsonNode value)
      • toObjectNode

        public static com.fasterxml.jackson.databind.node.ObjectNode toObjectNode​(com.fasterxml.jackson.databind.JsonNode value)
      • isBoolean

        public static boolean isBoolean​(com.fasterxml.jackson.databind.JsonNode value)
      • toBoolean

        public static Boolean toBoolean​(com.fasterxml.jackson.databind.JsonNode value)
      • isNumber

        public static boolean isNumber​(com.fasterxml.jackson.databind.JsonNode value)
      • toNumber

        public static Number toNumber​(com.fasterxml.jackson.databind.JsonNode value)
      • isObject

        public static boolean isObject​(com.fasterxml.jackson.databind.JsonNode value)
      • isObjectWithProperty

        public static boolean isObjectWithProperty​(com.fasterxml.jackson.databind.JsonNode value,
                                                   String propertyName)
      • isObjectWithPropertyValue

        public static boolean isObjectWithPropertyValue​(com.fasterxml.jackson.databind.JsonNode value,
                                                        String propertyName,
                                                        String propertyValue)
      • toObject

        public static com.fasterxml.jackson.databind.node.ObjectNode toObject​(com.fasterxml.jackson.databind.JsonNode value)
      • isArray

        public static boolean isArray​(com.fasterxml.jackson.databind.JsonNode value)
      • toArray

        public static com.fasterxml.jackson.databind.node.ArrayNode toArray​(com.fasterxml.jackson.databind.JsonNode value)
      • toList

        public static List<com.fasterxml.jackson.databind.JsonNode> toList​(com.fasterxml.jackson.databind.JsonNode value)