Skip to content

Add --json output format#71

Open
onchito-walks wants to merge 1 commit into
ApexOpsStudio:mainfrom
onchito-walks:add-json-output
Open

Add --json output format#71
onchito-walks wants to merge 1 commit into
ApexOpsStudio:mainfrom
onchito-walks:add-json-output

Conversation

@onchito-walks
Copy link
Copy Markdown

Implementation

Added --json flag to all CLI commands (add, list, done).

Acceptance Criteria

  • All commands support --json flag
  • JSON output is valid and parseable
  • Tests pass with new functionality (8/8 passing)
  • Documentation updated with examples

Usage

# JSON output (flag before subcommand)
python task.py --json add "Buy groceries"
python task.py --json list
python task.py --json done 1

JSON Output Format

{
  "success": true,
  "tasks": [...],
  "count": 1
}\```

### Test Results

8 passed in 0.51s


### Payment

BTC: `1Ast5dKr9z1bLWFBnyh6WDQSgyL7EHJosp`

- Add --json flag to main parser (must come before subcommand)
- All commands (add, list, done) return structured JSON when --json present
- JSON output includes success, tasks, count fields
- Extended test suite: 8 tests, all passing
- Updated README with JSON usage examples

Bounty: ApexOpsStudio#1
Payment: 1Ast5dKr9z1bLWFBnyh6WDQSgyL7EHJosp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant