Class JsonUtil
java.lang.Object
com.flowable.platform.common.util.JsonUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
alwaysSet
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.node.ObjectNode jsonNode, String fieldName, Object value) static com.fasterxml.jackson.databind.JsonNode
static com.fasterxml.jackson.databind.node.ArrayNode
convertToArrayNode
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Collection<Object> valueList) static com.fasterxml.jackson.databind.node.ArrayNode
convertToArrayNode
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Set<String> ids) static Boolean
getBoolean
(com.fasterxml.jackson.databind.JsonNode jsonNode, String field) static boolean
getBoolean
(com.fasterxml.jackson.databind.JsonNode jsonNode, String field, boolean defaultValue) static Date
static Instant
getInstant
(com.fasterxml.jackson.databind.JsonNode jsonNode, String field) static Integer
getInteger
(com.fasterxml.jackson.databind.JsonNode jsonNode, String field) static int
getInteger
(com.fasterxml.jackson.databind.JsonNode jsonNode, String field, int defaultValue) static String
getIso8601String
(Date input) static <T> List<T>
getListFromArrayNode
(com.fasterxml.jackson.databind.JsonNode node, String field, Function<com.fasterxml.jackson.databind.JsonNode, T> extractor) static <T> List<T>
getListFromArrayNode
(com.fasterxml.jackson.databind.node.ArrayNode target, Function<com.fasterxml.jackson.databind.JsonNode, T> extractor) static Long
static Long
static Object
getRawValue
(com.fasterxml.jackson.databind.JsonNode jsonNode) static <T> Set<T>
getSetFromArrayNode
(com.fasterxml.jackson.databind.JsonNode node, String field, Function<com.fasterxml.jackson.databind.JsonNode, T> extractor) static String
static String
static String
nullSafeGetDate
(Date date) static void
nullSafeSet
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.node.ObjectNode jsonNode, String fieldName, Object value) static void
static void
nullSafeSetIfNotSet
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.node.ObjectNode jsonNode, String fieldName, Object value)
-
Method Details
-
alwaysSet
-
nullSafeSet
-
nullSafeSetIfNotSet
-
nullSafeSet
-
nullSafeGetDate
-
convertToArrayNode
-
asNode
public static com.fasterxml.jackson.databind.JsonNode asNode(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Object value) -
convertToArrayNode
public static com.fasterxml.jackson.databind.node.ArrayNode convertToArrayNode(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Collection<Object> valueList) -
getIso8601String
-
getRawValue
-
getString
-
getString
-
getInteger
-
getInteger
public static int getInteger(com.fasterxml.jackson.databind.JsonNode jsonNode, String field, int defaultValue) -
getLong
-
getLong
-
getDate
-
getInstant
-
getBoolean
-
getBoolean
public static boolean getBoolean(com.fasterxml.jackson.databind.JsonNode jsonNode, String field, boolean defaultValue) -
getListFromArrayNode
-
getListFromArrayNode
-
getSetFromArrayNode
-