An empty expression is not an error
The rule
- An empty expression is valid: it passes validation, and it produces a defined result rather than a failure.
- A mapper output whose expression is empty is null, whatever the engine.
- An extractor whose path is empty returns its input unchanged, reports success, and reports no match.
What it means
An empty expression is not treated as an author mistake in either direction a
node can use one. What "empty" resolves to is fixed by which of the two
families (LANG-1) the node belongs to, not by the engine selected: a node that
writes an output from an expression gets null for an empty one, and a node
that reads a value out of a context by path returns that context unchanged,
still reporting success, when the path is empty. Neither shape depends on
which engine is configured — the short-circuit happens before an engine ever
runs.
Example
A mapping node produces one output whose expression is empty:
nullAn extractor given a path of "" against an input of {"a": 1} never reaches
an engine either. It reports success, reports no match, and delivers the
context it was handed back unchanged:
{"a": 1}