Package com.mikuac.shiro.common.utils
Class JsonUtils
java.lang.Object
com.mikuac.shiro.common.utils.JsonUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapperstatic booleanstatic StringnodeToString(com.fasterxml.jackson.databind.JsonNode node) static <T> List<T>parseArray(com.fasterxml.jackson.databind.JsonNode json, Class<T> clazz) static Optional<com.fasterxml.jackson.databind.JsonNode>parseObject(String jsonString) static com.fasterxml.jackson.databind.JsonNodeparseToJsonNode(Object value) static <T> Tstatic voidsetCustomObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) static StringtoJSONString(Object object)
-
Method Details
-
setCustomObjectMapper
public static void setCustomObjectMapper(@Nullable com.fasterxml.jackson.databind.ObjectMapper mapper) -
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
parseObject
-
parseArray
-
toJSONString
-
isValid
-
readValue
@Nullable public static <T> T readValue(String jsonString, com.fasterxml.jackson.core.type.TypeReference<T> typeReference) -
nodeToString
-
parseToJsonNode
-