Interface IJsonNodeService

All Known Implementing Classes:
JsonNodeService

public interface IJsonNodeService
  • Method Summary

    Modifier and Type
    Method
    Description
    getAttributeAsDataType(com.fasterxml.jackson.databind.JsonNode data, String dataType)
    convert json node un object with data type specified Support for the following data types:
    * String
    * Boolean
    * boolean
    * Integer
    * int
    * Long
    * Double
    * Float
    * BigDecimal
    * LocalDate
    * LocalDateTime
    com.fasterxml.jackson.databind.JsonNode
    getJsonAttribute(com.fasterxml.jackson.databind.JsonNode jsonNode, String path)
    Find embedded jsonNode, can be used to find json objects in any depth level
    com.fasterxml.jackson.databind.JsonNode
    receives a String and converts it to a jsonNode
    mapAttributeFromJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode, String path, String dataType)
    Searches for the attribute specified in the path and returns it with the data type specified in dataType
    List<com.fasterxml.jackson.databind.JsonNode>
    mapAttributeFromJsonNodeAsList(com.fasterxml.jackson.databind.JsonNode jsonNode, String path)
     
  • Method Details

    • mapAttributeFromJsonNode

      Object mapAttributeFromJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode, String path, String dataType)
      Searches for the attribute specified in the path and returns it with the data type specified in dataType

      > Support for the following data types:
      * String
      * Boolean
      * boolean
      * Integer
      * int
      * Long
      * Double
      * Float
      * BigDecimal
      * LocalDate
      * LocalDateTime

      Parameters:
      jsonNode - jsonNode
      path - path to find attribute inside jsonNode
      dataType - data type of the attribute to be returned
      Returns:
      Object
    • getJsonNodeFromString

      com.fasterxml.jackson.databind.JsonNode getJsonNodeFromString(String json)
      receives a String and converts it to a jsonNode
      Parameters:
      json - Json as string
      Returns:
      JsonNode
    • mapAttributeFromJsonNodeAsList

      List<com.fasterxml.jackson.databind.JsonNode> mapAttributeFromJsonNodeAsList(com.fasterxml.jackson.databind.JsonNode jsonNode, String path)
    • getAttributeAsDataType

      Object getAttributeAsDataType(com.fasterxml.jackson.databind.JsonNode data, String dataType)
      convert json node un object with data type specified Support for the following data types:
      * String
      * Boolean
      * boolean
      * Integer
      * int
      * Long
      * Double
      * Float
      * BigDecimal
      * LocalDate
      * LocalDateTime
      Returns:
      dataType converter
    • getJsonAttribute

      com.fasterxml.jackson.databind.JsonNode getJsonAttribute(com.fasterxml.jackson.databind.JsonNode jsonNode, String path)
      Find embedded jsonNode, can be used to find json objects in any depth level
      Parameters:
      jsonNode - jsonNode
      path - path to find object
      Returns:
      JsonNode