Skip to content

Switch default output format from text to json (12.14) #398

@josecelano

Description

@josecelano

Overview

Switch the default CLI output format from text to json (roadmap task 12.14).

This is the final task in epic #348. All previous commands (12.1–12.13) now have JSON output implemented, satisfying the prerequisite that prevented this change.

Specification

See: docs/issues/switch-default-output-format-to-json.md

Changes Required

  • Move #[default] from OutputFormat::Text to OutputFormat::Json in src/presentation/cli/input/cli/output_format.rs
  • Update default_value = "text"default_value = "json" and doc comment in src/presentation/cli/input/cli/args.rs
  • Update doctest asserting OutputFormat::default() is Text
  • Update any other tests/examples relying on the old default

Breaking Change

Users relying on unformatted text output without --output-format will now receive JSON. Explicit --output-format text is required to restore the old behaviour.

Acceptance Criteria

  • OutputFormat::default() returns OutputFormat::Json
  • Running any command without --output-format produces valid JSON
  • --output-format text still produces human-readable text
  • All tests pass, all linters pass

Related

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions