Class JsonUtil
java.lang.Object
com.flowable.platform.common.util.JsonUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidalwaysSet(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.node.ObjectNode jsonNode, String fieldName, Object value) static com.fasterxml.jackson.databind.JsonNodestatic com.fasterxml.jackson.databind.node.ArrayNodeconvertToArrayNode(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Collection<Object> valueList) static com.fasterxml.jackson.databind.node.ArrayNodeconvertToArrayNode(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Set<String> ids) static BooleangetBoolean(com.fasterxml.jackson.databind.JsonNode jsonNode, String field) static booleangetBoolean(com.fasterxml.jackson.databind.JsonNode jsonNode, String field, boolean defaultValue) static Datestatic InstantgetInstant(com.fasterxml.jackson.databind.JsonNode jsonNode, String field) static IntegergetInteger(com.fasterxml.jackson.databind.JsonNode jsonNode, String field) static intgetInteger(com.fasterxml.jackson.databind.JsonNode jsonNode, String field, int defaultValue) static StringgetIso8601String(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 Longstatic Longstatic ObjectgetRawValue(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 Stringstatic Stringstatic StringnullSafeGetDate(Date date) static voidnullSafeSet(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.node.ObjectNode jsonNode, String fieldName, Object value) static voidstatic voidnullSafeSetIfNotSet(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
-