Value Operations
Value provides two kinds of operations:
- Static - pure functions on any value without a schema:
Operations.clone,Hash.value,Value.diff,Operations.patch - Instance - schema-aware operations via
jt.value.*:cast,clean,convert,create,instantiate
Methods
| Method | Kind | Description |
|---|---|---|
Operations.clone / Hash.value | Static | Deep copy; deterministic hash |
Value.diff / Operations.patch | Static | Structural diff; apply a single operation |
value.cast / clean / convert | Instance | Type coercion, stripping, conversion |
value.create | Instance | Zero-value instance for blank form state |
All examples use the bookstore domain.
Related
instantiate- produce a typed value before diffing or cloningmaterialize- alternative tovalue.createfor defaults-only instancesCompose.getDefaults- extract declared defaults without zero-values
See also
- Bookstore domain - schemas and values used in examples
- Argument conventions - how
jt.value.*instance methods relate to the registry