- Notifications
You must be signed in to change notification settings - Fork673
Closed
Description
Each object is returned as distinct JSON object instead of all the objects being contained in an array. For example listing MRs
gitlab -o json project-merge-request list --state merged --project 'mygroup%2fmyproj'
Expected (ie what GitLab returns with equivalent curl request):
[ { "id":1234, "iid": 1, "project_id": 5, ...}, { "id":1235, "iid": 2, "project_id": 5, ...}, { "id":1236, "iid": 3, "project_id": 5, ...}]
Actual:
{ "id":1234, "iid": 1, "project_id": 5, ...}{ "id":1235, "iid": 2, "project_id": 5, ...}{ "id":1236, "iid": 3, "project_id": 5, ...}
This makes any existing scripting based on incompatible (iejq '.[]|select(...).id'
has to be rewritten asjq 'select(...).id'
).