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

Open
wants to merge 2 commits into
base: release/2.0.0
Choose a base branch
from

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

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