FlowDrop Workflow Specification 1.0-draft

Extracting all matches for a property path always yields a list

The rule

Normative: this is the rule

Extracting all matches for a property path yields a list: a single result is wrapped in a one-element list, and a null result or no match yields the empty list.

What it means

Extracting all matches never hands back the bare value it found — even where the path can only ever match one thing, the result is still a list, so calling code does not need two shapes depending on what the path looked like. The sharper edge is the null case: a path that reads a stored null does not come back as a one-element list holding that null. Nothing was "found" there as far as extracting all matches is concerned, so it collapses to the same empty list as a path that matched nothing at all.

Example

Extracting all matches for store.name, a path that can only ever match one value:

What extracting all matches returns for a single matchwrapped
["Test Store"]
A context whose path reads a stored nullcollapsed
{"key": null}
What extracting all matches returns for itempty
[]
Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0-draft · LANG-19 · changed in spec 1.0