Fix: wrap list JSON output in array for parseable output - #80
Conversation
Fix ExplanationBug: Root cause: Solution: Modified
This likely fixes all list endpoints that use the same |
|
👋 Hi! Just checking in — this PR has been open 14+ days with no review. Happy to make any adjustments if needed! 🙏 |
|
👋 Hi! Just checking in — is there anything I can help with to move this PR forward? Happy to address any feedback! 🙏 |
|
Hi @ALL, gentle reminder that this PR is waiting for review. Happy to make any changes — just let me know! 🙏 |
|
Friendly ping — any updates? Happy to address feedback. |
Summary
Fixes mercury-cli issue #70.
When running commands like
mercury accounts list --format json, multiple pretty-printed JSON objects were emitted back-to-back without an enclosing array or commas, making output unparseable by standard JSON parsers:{"id": "...", "name": "..."} {"id": "...", "name": "..."}This change wraps JSON/pretty formatted list output in a proper JSON array with commas between items:
[\n, appends,\n]\nto collected output[\n, emits items with,\nseparators, writes\n]\nBefore:
{...}{...}(unparseable)After:
[{...},{...}](valid JSON array)Closes #70