Class JsonNodeUtils

java.lang.Object
cn.herodotus.engine.core.identity.jackson2.JsonNodeUtils

public class JsonNodeUtils extends Object

Description: This class is a straight copy from Spring Authorization Server.

Author:
: gengwei.zheng
Date:
: 2022/10/24 15:31
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.fasterxml.jackson.core.type.TypeReference<Instant>
     
    static final com.fasterxml.jackson.core.type.TypeReference<Map<String,Object>>
     
    static final com.fasterxml.jackson.core.type.TypeReference<Set<String>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    findBooleanValue(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName)
     
    static com.fasterxml.jackson.databind.JsonNode
    findObjectNode(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName)
     
    static String
    findStringValue(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName)
     
    static <T> T
    findValue(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
     
    static com.fasterxml.jackson.databind.JsonNode
    readJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode, String field)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INSTANT

      public static final com.fasterxml.jackson.core.type.TypeReference<Instant> INSTANT
    • STRING_SET

      public static final com.fasterxml.jackson.core.type.TypeReference<Set<String>> STRING_SET
    • STRING_OBJECT_MAP

      public static final com.fasterxml.jackson.core.type.TypeReference<Map<String,Object>> STRING_OBJECT_MAP
  • Constructor Details

    • JsonNodeUtils

      public JsonNodeUtils()
  • Method Details

    • findStringValue

      public static String findStringValue(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName)
    • findBooleanValue

      public static boolean findBooleanValue(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName)
    • findValue

      public static <T> T findValue(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeReference, com.fasterxml.jackson.databind.ObjectMapper mapper)
    • findObjectNode

      public static com.fasterxml.jackson.databind.JsonNode findObjectNode(com.fasterxml.jackson.databind.JsonNode jsonNode, String fieldName)
    • readJsonNode

      public static com.fasterxml.jackson.databind.JsonNode readJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode, String field)