Skip to main content

json_output_mode_for_kind

Function json_output_mode_for_kind 

Source
pub fn json_output_mode_for_kind(
    cli: &Cli,
    config: Option<&Config>,
    json_kind: &str,
) -> JsonOutputMode
Expand description

Resolve the runtime JSON mode promised by a command contract’s json_kind.

JSONL commands are stream-shaped and opt into machine output only when explicitly requested. That prevents commands like watch from silently changing format when piped through human tools.