cli icon indicating copy to clipboard operation
cli copied to clipboard

Parsing individual json objects into json array

Open arankeparth opened this issue 1 year ago • 2 comments

- What I did Added commas between individual json objects and then added brackets around them to make an array.

- How I did it Read each line from the buffer then added comma and finally added brackets.

- How to verify it

- Description for the changelog Parsing individual json objects into json array

arankeparth avatar May 02 '24 12:05 arankeparth

This is a slightly dirty fix. please suggest some changes if possible!

arankeparth avatar May 02 '24 12:05 arankeparth

This would be a breaking change; the current output is line-delimited JSON, which most tools would be able to handle already.

thaJeztah avatar May 02 '24 16:05 thaJeztah

I'm going to close this for now; not only is this an undesired breaking change (the output here has always intentionally been JSON lines), but kludging an array together using string manipulation (instead of changing the serialization code) is not a sensible way to make this change even if it was desired.

neersighted avatar May 24 '24 13:05 neersighted