Expand description
Server-side expression resolver for v2 JSON-UI Specs.
Walks every Element.props in a spec’s flat element map and substitutes
two narrow expression object shapes against Spec.data:
{"$data": "/slash/path"}— replaced with the JSON value at the path, preserving type. Missing paths resolve toValue::Null.{"$template": "literal {/path} more"}— replaced with aValue::Stringbuilt by substituting every{slash-path}placeholder viaresolve_path_string. Missing placeholders interpolate to"".
Infallible: malformed expressions (non-string value, sibling keys)
degrade to literal JSON — no panic, no log, no Result.
Single-pass: expressions inside resolved $data output are NOT
re-resolved. This is the inner-platform-effect firewall (Phase 118 D-07).
Scope: only el.props is walked. Spec.data, Spec.title,
Spec.layout, el.children, el.action, el.visible are untouched.
Pipeline order: must run after resolve_actions and before
Catalog::validate (Phase 118 D-08).
Functions§
- resolve_
expressions - Resolve every
$dataand$templateexpression inspec.elements[*].props.