Skip to main content

render_format

Function render_format 

Source
pub fn render_format(
    value: Value,
    format: OutputFormat,
    presentation: PresentationMode,
) -> String
Expand description

Render a successful verb result value to a wire string using the given format.

Called at the single serialization seam (ADR-078 §9) AFTER all $prev chain resolution and AFTER the PresentationMode transform.

Error envelopes (ok=false) are never passed here — the caller must handle them as compact JSON directly (ADR-078 §8.2).

Agent presentation applies the redundancy-reduction pre-pass (§7) for every format, including JSON — at Machine scope for json (keeps full_id) and View scope for auto/table (drops it too, ADR-078 Amendment 3). Auto/table also apply View scope for Human presentation; Verbose remains canonical and unreduced. The prepared value is then encoded as compact JSON or dispatched to the shape-aware renderer. Verbose also disables cell truncation in the table renderer (§3a).