Read a spec_ir object from a YAML or JSON file
Arguments
- path
Path to a
.yaml,.yml, or.jsonspecification file.- format
Optional format (
"yaml"or"json"). Inferred frompathextension whenNULL.- validate
Logical; if
TRUE(default), validates the loaded IR.- auto_migrate
Logical; if
TRUE, automatically migrates legacy IR versions viamigrate_spec_ir(). Defaults toFALSE.
Examples
spec <- new_spec_ir()
tmp <- tempfile(fileext = ".json")
write_spec_ir(spec, tmp)
spec2 <- read_spec_ir(tmp)
unlink(tmp)
