Skip to content

Add JSON output for task list#89

Open
Wheezily wants to merge 1 commit into
ApexOpsStudio:mainfrom
Wheezily:bounty/list-json-output
Open

Add JSON output for task list#89
Wheezily wants to merge 1 commit into
ApexOpsStudio:mainfrom
Wheezily:bounty/list-json-output

Conversation

@Wheezily
Copy link
Copy Markdown

Closes #1.

Changes:

  • Adds --json to python task.py list.
  • Prints an empty JSON array when no task file exists.
  • Prints the stored task list as formatted JSON when tasks exist.
  • Adds a pytest-style test covering JSON list output.

Validation:

  • python -m compileall task.py commands test_task.py
  • python task.py list --json
  • python task.py add "Buy milk" followed by python task.py list --json | python -m json.tool

Note: pytest is not installed in this local environment, so I validated with standard Python checks.

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