Skip to content

Parsing individual json objects into json array - #5052

Closed
arankeparth wants to merge 1 commit into
docker:masterfrom
arankeparth:json_bug_fix
Closed

arankeparth wants to merge 1 commit into
docker:masterfrom
arankeparth:json_bug_fix

Conversation

@arankeparth

Copy link
Copy Markdown

- 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

arankeparth commented May 2, 2024 •

Copy link
Copy Markdown
Author

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

Signed-off-by: parth aranke <arankeparth1912@gmail.com>
@thaJeztah

Copy link
Copy Markdown
Member

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

@neersighted

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants