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 booleanChecks given value to be a Json array of object representation.static booleanisJsonArray(String value) Checks given value could be JSON array string.static booleanisJsonObject(String value) Checks given value could be JSON object string.static com.fasterxml.jackson.databind.ObjectMappermapper()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
-