Skip to main content

normalize_str

Function normalize_str 

Source
pub fn normalize_str(s: &str) -> Result<Run, Error>
Expand description

Parse a cassette from JSON and normalize it into a Run.

The string entry to the record path’s normalizer — what the CLI reaches for once it has sniffed a cassette_version and routed a file here, paralleling [amberfork_ingest::from_json_str] on the passive path. Kept separate from normalize so the in-memory mapping stays a pure &Cassette -> Run function with no serde in its signature.

§Errors

Returns the serde_json::Error if the input is not a well-formed cassette (malformed JSON, or valid JSON whose shape does not match the cassette contract). The caller owns turning that into a file-attributed, doc-linked message.