Package org.apache.camel.model.language
Class JsonPathExpression
- java.lang.Object
-
- org.apache.camel.model.language.ExpressionDefinition
-
- org.apache.camel.model.language.JsonPathExpression
-
- All Implemented Interfaces:
org.apache.camel.Expression
,org.apache.camel.ExpressionFactory
,HasExpressionType
,org.apache.camel.Predicate
,org.apache.camel.PredicateFactory
,org.apache.camel.spi.ExpressionFactoryAware
,org.apache.camel.spi.PredicateFactoryAware
@Metadata(firstVersion="2.13.0", label="language,json", title="JSONPath") public class JsonPathExpression extends ExpressionDefinition
Evaluates a JSONPath expression against a JSON message body.
-
-
Constructor Summary
Constructors Constructor Description JsonPathExpression()
JsonPathExpression(String expression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAllowEasyPredicate()
String
getAllowSimple()
String
getHeaderName()
String
getLanguage()
String
getOption()
Class<?>
getResultType()
String
getResultTypeName()
String
getSuppressExceptions()
String
getWriteAsString()
void
setAllowEasyPredicate(String allowEasyPredicate)
Whether to allow using the easy predicate parser to pre-parse predicates.void
setAllowSimple(String allowSimple)
Whether to allow in inlined Simple exceptions in the JSONPath expressionvoid
setHeaderName(String headerName)
Name of header to use as input, instead of the message bodyvoid
setOption(String option)
To configure additional options on JSONPath.void
setResultType(Class<?> resultType)
Sets the class of the result type (type from output)void
setResultTypeName(String resultTypeName)
Sets the class name of the result type (type from output)void
setSuppressExceptions(String suppressExceptions)
Whether to suppress exceptions such as PathNotFoundException.void
setWriteAsString(String writeAsString)
Whether to write the output of each row/element as a JSON String value instead of a Map/POJO value.-
Methods inherited from class org.apache.camel.model.language.ExpressionDefinition
createExpression, createPredicate, evaluate, getExpression, getExpressionFactory, getExpressionType, getExpressionValue, getId, getLabel, getLabel, getPredicate, getPredicateFactory, getTrim, init, initPredicate, matches, setExpression, setExpressionType, setExpressionValue, setId, setTrim, toString
-
-
-
-
Constructor Detail
-
JsonPathExpression
public JsonPathExpression()
-
JsonPathExpression
public JsonPathExpression(String expression)
-
-
Method Detail
-
getResultTypeName
public String getResultTypeName()
-
setResultTypeName
public void setResultTypeName(String resultTypeName)
Sets the class name of the result type (type from output)
-
getResultType
public Class<?> getResultType()
-
setResultType
public void setResultType(Class<?> resultType)
Sets the class of the result type (type from output)
-
getSuppressExceptions
public String getSuppressExceptions()
-
getAllowSimple
public String getAllowSimple()
-
setAllowSimple
public void setAllowSimple(String allowSimple)
Whether to allow in inlined Simple exceptions in the JSONPath expression
-
getAllowEasyPredicate
public String getAllowEasyPredicate()
-
setAllowEasyPredicate
public void setAllowEasyPredicate(String allowEasyPredicate)
Whether to allow using the easy predicate parser to pre-parse predicates.
-
setSuppressExceptions
public void setSuppressExceptions(String suppressExceptions)
Whether to suppress exceptions such as PathNotFoundException.
-
getWriteAsString
public String getWriteAsString()
-
setWriteAsString
public void setWriteAsString(String writeAsString)
Whether to write the output of each row/element as a JSON String value instead of a Map/POJO value.
-
getHeaderName
public String getHeaderName()
-
setHeaderName
public void setHeaderName(String headerName)
Name of header to use as input, instead of the message body
-
getOption
public String getOption()
-
setOption
public void setOption(String option)
To configure additional options on JSONPath. Multiple values can be separated by comma.
-
getLanguage
public String getLanguage()
- Overrides:
getLanguage
in classExpressionDefinition
-
-