docs: ps --format json outputs JSON Lines, not a JSON array#13868
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the docker compose ps documentation to correctly describe --format json output as newline-delimited JSON (JSON Lines / NDJSON), matching the behavior introduced in v2.21.0 and aligning with docker ps --format json.
Changes:
- Replace documentation claims/examples that showed a JSON array with JSON Lines output (one object per line).
- Update the
jqexample/output to reflect streaming JSON objects rather than an array.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/reference/docker_compose_ps.yaml | Updates the generated reference YAML examples to show JSON Lines output for --format json. |
| docs/reference/compose_ps.md | Updates the rendered markdown reference to match JSON Lines behavior and adjusts the jq example accordingly. |
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This documentation PR correctly updates the docker compose ps --format json description from "JSON array" to "JSON Lines (one JSON object per line)", aligning the docs with the actual behavior introduced in v2.21.0 (#10918).
What was reviewed:
docs/reference/compose_ps.md— updated description, added JSON Lines example, andjq .pretty-print exampledocs/reference/docker_compose_ps.yaml— corresponding YAML reference updated consistently
Findings: No bugs or factual errors found. The two files are consistent with each other. The JSON Lines examples are technically accurate. The jq . output correctly shows two separate JSON objects (as jq would emit them from a JSON Lines stream). The alignment claim with docker ps --format json is accurate.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Output was aligned with `docker ps --format json` in v2.21.0 (docker#10918) but the docs were never updated. Fixes docker#13850 Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
b810ba8 to
f4ec4a9
Compare
What I did
Output was aligned with
docker ps --format jsonin v2.21.0 (#10918) but the docs were never updated.Related issue
Fixes #13850
(not mandatory) A picture of a cute animal, if possible in relation to what you did