Package org.apache.camel.model.language
Class JsonPathExpression
java.lang.Object
org.apache.camel.model.language.ExpressionDefinition
org.apache.camel.model.language.TypedExpressionDefinition
org.apache.camel.model.language.SingleInputTypedExpressionDefinition
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 SingleInputTypedExpressionDefinition
Evaluates a JSONPath expression against a JSON message body.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder
is a specific builder forJsonPathExpression
.static enum
Option
defines the possible json path options that can be used.Nested classes/interfaces inherited from class org.apache.camel.model.language.SingleInputTypedExpressionDefinition
SingleInputTypedExpressionDefinition.AbstractBuilder<T extends SingleInputTypedExpressionDefinition.AbstractBuilder<T,
E>, E extends SingleInputTypedExpressionDefinition> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
To configure additional options on JSONPath.void
setSuppressExceptions
(String suppressExceptions) Whether to suppress exceptions such as PathNotFoundException.void
setUnpackArray
(String unpackArray) Whether to unpack a single element json-array into an object.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.SingleInputTypedExpressionDefinition
getSource, setSource
Methods inherited from class org.apache.camel.model.language.TypedExpressionDefinition
getResultType, getResultTypeName, setResultType, setResultTypeName
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 Details
-
JsonPathExpression
public JsonPathExpression() -
JsonPathExpression
-
-
Method Details
-
getSuppressExceptions
-
getAllowSimple
-
setAllowSimple
Whether to allow in inlined Simple exceptions in the JSONPath expression -
getAllowEasyPredicate
-
setAllowEasyPredicate
Whether to allow using the easy predicate parser to pre-parse predicates. -
setSuppressExceptions
Whether to suppress exceptions such as PathNotFoundException. -
getWriteAsString
-
setWriteAsString
Whether to write the output of each row/element as a JSON String value instead of a Map/POJO value. -
getUnpackArray
-
setUnpackArray
Whether to unpack a single element json-array into an object. -
getOption
-
setOption
To configure additional options on JSONPath. Multiple values can be separated by comma. -
getLanguage
- Overrides:
getLanguage
in classExpressionDefinition
-