Normalizes raw nested list representations (for example from JSON or YAML
parsing or external LLM output) into a typed spec_ir object without
evaluating any strings as R code.
Arguments
- x
A
spec_irobject or named list matching the IR structure.- validate
Logical; if
TRUE(default), runsassert_valid_spec_ir().
Examples
raw_list <- unclass(new_spec_ir())
spec <- as_spec_ir(raw_list)
is_spec_ir(spec)
#> [1] TRUE
