Interface IJsonNodeService
- All Known Implementing Classes:
JsonNodeService
public interface IJsonNodeService
-
Method Summary
Modifier and TypeMethodDescriptiongetAttributeAsDataType(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
* LocalDateTimecom.fasterxml.jackson.databind.JsonNodegetJsonAttribute(com.fasterxml.jackson.databind.JsonNode jsonNode, String path) Find embedded jsonNode, can be used to find json objects in any depth levelcom.fasterxml.jackson.databind.JsonNodegetJsonNodeFromString(String json) receives a String and converts it to a jsonNodemapAttributeFromJsonNode(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 dataTypeList<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- jsonNodepath- path to find attribute inside jsonNodedataType- data type of the attribute to be returned- Returns:
- Object
-
getJsonNodeFromString
receives a String and converts it to a jsonNode- Parameters:
json- Json as string- Returns:
- JsonNode
-
mapAttributeFromJsonNodeAsList
-
getAttributeAsDataType
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- jsonNodepath- path to find object- Returns:
- JsonNode
-