Class JsonFunctions.JsonPath
java.lang.Object
org.apache.juneau.commons.svl.TypedFunction
org.apache.juneau.commons.svl.functions.JsonFunctions.JsonPath
- All Implemented Interfaces:
VarFunction
- Enclosing class:
- JsonFunctions
#{jsonPath(json, path)} / #{jsonPath(json, path, default)} — extracts a
value via a slash-rooted path (e.g. "/data/0/name").
Returns the matched value as a String (objects/arrays serialize back to JSON). Missing
path returns "" for the two-arg form, or default for the three-arg form.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.juneau.commons.svl.TypedFunction
invoke, maxArity, minArity
-
Constructor Details
-
JsonPath
public JsonPath()
-
-
Method Details
-
name
Description copied from interface:VarFunctionThe function's invocation name as it appears between#{}and the opening parenthesis in the template. Must consist of ASCII letters, digits, and underscores; must begin with a letter.- Returns:
- The invocation name. Never
nullor empty.
-
invoke
-
invoke
-