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

Custom converters don't have to handle partial data #19654

Closed
tdykstra opened this issue Jul 23, 2020 · 0 comments · Fixed by #21991
Closed

Custom converters don't have to handle partial data #19654

tdykstra opened this issue Jul 23, 2020 · 0 comments · Fixed by #21991
Assignees
Labels
doc-enhancement Improve the current content [org][type][category] dotnet/svc

Comments

@tdykstra
Copy link
Contributor

From @layomia in dotnet/runtime#39795 (comment)

In the existing JsonConverter model, custom converters do not have to worry about handling partial data, as the serializer passes all the data for the current JSON scope. Skip/TrySkip logic is unnecessary. We should consider adding a section about this in the docs.

The "read ahead" logic that the serializer performs to make this possible does have some perf implications. There has been some discussion around a new model to, among other benefits, enable more performant async-handling when custom converters are used - #1562. Relevant parts of the new model have been implemented internally in serializer, but exposing this publicly is not currently on the roadmap for System.Text.Json.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org][type][category] dotnet/svc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants