pub fn load_stack_spec(
json: &str,
) -> Result<SerializableStackSpec, VersionedLoadError>Expand description
Load a stack spec from JSON with automatic version detection and migration.
This function:
- Detects the AST version from the JSON
- Deserializes the appropriate version
- Migrates to the latest format if needed
§Arguments
json- The JSON string containing the AST
§Returns
The deserialized and migrated SerializableStackSpec
§Example
ⓘ
let json = std::fs::read_to_string("MyStack.stack.json")?;
let spec = load_stack_spec(&json)?;