Skip to content

Developers using JsonSerializer can asynchronously (de)serialize IAsyncEnumerable<T> #1570

Closed
@davidfowl

Description

@davidfowl

It would serialize to a JSON array but in a streaming manner. This would be very useful for things like MVC that want to support returning entity framework queries (which implement IAsyncEnumerable) to the response steam without buffering the entire enumeration first (which is what is currently being implemented https://github.com/aspnet/AspNetCore/pull/11118/files).

EDIT @eiriktsarpalis see #1570 (comment) for the full API proposal.

Metadata

Metadata

Labels

Cost:SWork that requires one engineer up to 1 weekPriority:1Work that is critical for the release, but we could probably ship withoutUser StoryA single user-facing feature. Can be grouped under an epic.api-approvedAPI was approved in API review, it can be implementedarea-System.Text.Json

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions