Class Json
java.lang.Object
org.apache.camel.component.jackson.transform.Json
-
Method Summary
Modifier and TypeMethodDescriptionarrayToJsonBeans
(com.fasterxml.jackson.databind.JsonNode json) Converts array json node to a list of json object strings.static boolean
Checks given value to be a Json array of object representation.static boolean
isJsonArray
(String value) Checks given value could be JSON array string.static boolean
isJsonObject
(String value) Checks given value could be JSON object string.static com.fasterxml.jackson.databind.ObjectMapper
mapper()
Provides access to the default object mapper instance.
-
Method Details
-
mapper
public static com.fasterxml.jackson.databind.ObjectMapper mapper()Provides access to the default object mapper instance.- Returns:
- the default object mapper.
-
isJson
Checks given value to be a Json array of object representation.- Parameters:
value
-- Returns:
-
isJsonObject
Checks given value could be JSON object string.- Parameters:
value
-- Returns:
-
isJsonArray
Checks given value could be JSON array string.- Parameters:
value
-- Returns:
-
arrayToJsonBeans
public static List<String> arrayToJsonBeans(com.fasterxml.jackson.databind.JsonNode json) throws com.fasterxml.jackson.core.JsonProcessingException Converts array json node to a list of json object strings. Used when splitting a json array with split EIP.- Parameters:
json
-- Returns:
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-