Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid buffering JSON data into a new MemoryStream during parsing #1857

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

MaggieKimani1
Copy link
Contributor

@MaggieKimani1 MaggieKimani1 commented Oct 3, 2024

JSON data can be read asynchronously, which means that when you receive a stream of JSON data (e.g., from a file, network, or database), you can process the data directly without needing to load it all into memory first.
This increases efficiency by reducing memory usage and allowing the program to respond faster, especially in cases with large or streaming data.

In contrast, YAML does not support asynchronous reading in most libraries, requiring the data to be fully buffered before processing it synchronously.

Fixes #1853

Copy link

sonarcloud bot commented Oct 3, 2024

@MaggieKimani1 MaggieKimani1 merged commit 2102659 into release/2.0.0 Oct 8, 2024
9 checks passed
@MaggieKimani1 MaggieKimani1 deleted the mk/avoid-buffering-json-data-streams branch October 8, 2024 08:10
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.

Reading JSON documents unnecessarily creates a buffered copy of the document
2 participants