1. MLSNBN and transforms
sUTL transforms JSON-shaped values into other JSON-shaped values. Its data model is MLSNBN: Map, List, String, Number, Boolean, Null.
- maps with string keys
- lists
- strings
- numbers
- booleans
- null
Those are both sUTL’s data and its program representation. A transform is not a string of source code: it is an MLSNBN value that a host program can store, generate, inspect, and evaluate.
Literal transforms
Numbers, booleans, and null evaluate to themselves:
4.2
Interactive conformance example: JavaScript is required to edit and run it.
Ordinary strings are also literal unless their prefix identifies compact builtin syntax.
Structural transforms
An ordinary map evaluates each value as a transform:
{
"person": "^$.name",
"active": true
}
Given {"name": "Ada"}, the result is:
{
"person": "Ada",
"active": true
}
Lists work the same way:
[1, "^$.value", 3]
Interactive conformance example: JavaScript is required to edit and run it.
Flattening a list
A list beginning with the exact marker "&&" evaluates its remaining items
and flattens one level:
["&&", [1, 2], 3, [4, 5]]
Result:
[1, 2, 3, 4, 5]
This form is useful for conditional list construction and concatenation. It is not recursive flattening.
Interactive conformance example: JavaScript is required to edit and run it.
Calling the runner
Open the browser playground, enter the source and transform as JSON, and choose Run transform. The same browser evaluator backs the editable examples throughout this guide.
Next: Paths.