pub fn json(
steps: &[Step],
totals: &SessionTotals,
annotations: Option<&Annotations>,
) -> Result<String>Expand description
Serialize a session to stable-schema JSON. Pretty-printed for readability;
callers that want compact output can jq -c. When annotations is
Some and non-empty, adds an annotations array at the top level;
omits the field entirely when there are no notes.