Package org.apache.camel.jsonpath
Class JsonPathExpression
java.lang.Object
org.apache.camel.support.ExpressionSupport
org.apache.camel.support.ExpressionAdapter
org.apache.camel.jsonpath.JsonPathExpression
- All Implemented Interfaces:
org.apache.camel.Expression
,org.apache.camel.Predicate
public class JsonPathExpression
extends org.apache.camel.support.ExpressionAdapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionevaluate
(org.apache.camel.Exchange exchange) com.jayway.jsonpath.Option[]
Class
<?> org.apache.camel.Expression
void
init
(org.apache.camel.CamelContext context) boolean
boolean
boolean
boolean
boolean
boolean
void
setAllowEasyPredicate
(boolean allowEasyPredicate) Whether to allow using the easy predicate parser to pre-parse predicates.void
setAllowSimple
(boolean allowSimple) Whether to allow in inlined simple exceptions in the json path expressionvoid
setOptions
(com.jayway.jsonpath.Option[] options) To configure the json path options to usevoid
setPredicate
(boolean predicate) Whether to be evaluated as a predicatevoid
setResultType
(Class<?> resultType) To configure the result type to usevoid
setSource
(org.apache.camel.Expression source) void
setSuppressExceptions
(boolean suppressExceptions) Whether to suppress exceptions such as PathNotFoundExceptionvoid
setUnpackArray
(boolean unpackArray) Whether to unpack a single element json-array into an object.void
setWriteAsString
(boolean writeAsString) Whether to write the output of each row/element as a JSON String value instead of a Map/POJO value.toString()
Methods inherited from class org.apache.camel.support.ExpressionAdapter
assertionFailureMessage, evaluate
Methods inherited from class org.apache.camel.support.ExpressionSupport
assertMatches, matches
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.Predicate
initPredicate
-
Constructor Details
-
JsonPathExpression
-
-
Method Details
-
isPredicate
public boolean isPredicate() -
setPredicate
public void setPredicate(boolean predicate) Whether to be evaluated as a predicate -
getResultType
-
setResultType
To configure the result type to use -
isSuppressExceptions
public boolean isSuppressExceptions() -
setSuppressExceptions
public void setSuppressExceptions(boolean suppressExceptions) Whether to suppress exceptions such as PathNotFoundException -
isAllowSimple
public boolean isAllowSimple() -
setAllowSimple
public void setAllowSimple(boolean allowSimple) Whether to allow in inlined simple exceptions in the json path expression -
isAllowEasyPredicate
public boolean isAllowEasyPredicate() -
setAllowEasyPredicate
public void setAllowEasyPredicate(boolean allowEasyPredicate) Whether to allow using the easy predicate parser to pre-parse predicates. SeeEasyPredicateParser
for more details. -
isWriteAsString
public boolean isWriteAsString() -
setWriteAsString
public void setWriteAsString(boolean writeAsString) Whether to write the output of each row/element as a JSON String value instead of a Map/POJO value. -
isUnpackArray
public boolean isUnpackArray() -
setUnpackArray
public void setUnpackArray(boolean unpackArray) Whether to unpack a single element json-array into an object. -
getSource
public org.apache.camel.Expression getSource() -
setSource
public void setSource(org.apache.camel.Expression source) -
getOptions
public com.jayway.jsonpath.Option[] getOptions() -
setOptions
public void setOptions(com.jayway.jsonpath.Option[] options) To configure the json path options to use -
evaluate
- Overrides:
evaluate
in classorg.apache.camel.support.ExpressionSupport
-
init
public void init(org.apache.camel.CamelContext context) - Specified by:
init
in interfaceorg.apache.camel.Expression
- Specified by:
init
in interfaceorg.apache.camel.Predicate
- Overrides:
init
in classorg.apache.camel.support.ExpressionAdapter
-
toString
-