pub fn detect_ast_version(json: &str) -> Result<String, VersionedLoadError>Expand description
Detect the AST version from a JSON string without full deserialization.
This is useful for logging, debugging, or routing decisions.
§Arguments
json- The JSON string containing the AST
§Returns
The detected version string, or "0.0.1" if the field is absent (backwards compatibility default).
§Example
ⓘ
let version = detect_ast_version(&json)?;
println!("AST version: {}", version);