dynamist / dynamist/phabfive

Add --format=jsonl for newline-delimited JSON output

Open
#179 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
3
Avg merge
45m
Merged PRs (30d)
30

Description

## Context

With the fix in #178, `--format=json` now outputs a valid JSON array when showing multiple tasks. This is correct for JSON but means the entire output must be buffered before writing.

## Proposal

Add `--format=jsonl` (or `--format=ndjson`) that outputs one JSON object per line, with no wrapping array. This is useful for:

- Streaming output (process tasks as they arrive)
- Piping to tools like `jq -c` that expect one object per line
- Appending to log files

### Example

```bash
$ phabfive --format=jsonl maniphest show T123 T456
{"Link":"https://phorge.example.com/T123","Task":{...}}
{"Link":"https://phorge.example.com/T456","Task":{...}}
```

### References

- [JSON Lines](https://jsonlines.org/)
- [ndjson](http://ndjson.org/)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.