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

[System.Text.Json] make possible to deserialize objects from stream without always fully reading stream. #39173

Closed
Dzliera opened this issue Jul 13, 2020 · 2 comments
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Text.Json
Milestone

Comments

@Dzliera
Copy link

Dzliera commented Jul 13, 2020

Currently JsonSerliazer.DeserializeAsync method always reads stream until completion. So if I try to deserialize object from NetworkStream, it blocks until the connection is open and not returns objects immediately. This seems a really big problem for me when I have a long-lived TCP connection and I send multiple objects over time with that connection.

@Dzliera Dzliera added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Jul 13, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jul 13, 2020
@layomia layomia removed the untriaged New issue has not been triaged by the area owner label Jul 16, 2020
@layomia layomia added this to the Future milestone Jul 16, 2020
@steveharter
Copy link
Member

steveharter commented Mar 24, 2021

See #1570 for IAsyncEnumerable support. This will give back control to the caller for each root-level object in a JSON array.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Text.Json
Projects
None yet
Development

No branches or pull requests

5 participants