Class JsonExpressionResolver

java.lang.Object
ai.mindconnect.workflow.jackson.JsonExpressionResolver
All Implemented Interfaces:
ExpressionResolver

public class JsonExpressionResolver extends Object implements ExpressionResolver
An ExpressionResolver that parses a JSON string literal.

Expressions are recognised by the json: prefix:

   json: {"name":"David","age":40}    → LinkedHashMap
   json: [1, 2, 3]                    → ArrayList
   json: "hello"                      → String
   json: 42                           → Integer / Long
   json: true                         → Boolean
 

This is useful for supplying structured objects as workflow input parameters from the UI or command-line without needing a scripting engine. For example, passing an input parameter value of json: {"items":["a","b"]} will parse and inject the map directly into the workflow variable scope.

Variable substitution (${var}) is applied to the JSON string before parsing so dynamic values can be embedded:

   json: {"user":"${username}"}