Skip to content

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

@holmboe

Description

@holmboe

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

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

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions