Skip to content

feat: add --json output flag to all commands#38

Open
rainlee wants to merge 2 commits intoApexOpsStudio:mainfrom
rainlee:bounty/1-json-output
Open

feat: add --json output flag to all commands#38
rainlee wants to merge 2 commits intoApexOpsStudio:mainfrom
rainlee:bounty/1-json-output

Conversation

@rainlee
Copy link
Copy Markdown

@rainlee rainlee commented Mar 27, 2026

Closes #1

Changes

Added --json flag support to add, list, and done commands.

Usage:

# Add task with JSON output
python task.py add "Buy groceries" --json
# → {"id": 1, "description": "Buy groceries", "done": false}

# List all tasks as JSON
python task.py list --json
# → [{"id": 1, "description": "Buy groceries", "done": false}]

# Mark done with JSON output
python task.py done 1 --json
# → {"id": 1, "description": "Buy groceries", "done": true}

Tests

Added 3 new tests covering JSON output for add, list, and empty list cases.
All 7 tests pass.

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.

Add --json output format

1 participant