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

Advise use of a single options instance in a custom converter #19878

Closed
tdykstra opened this issue Aug 6, 2020 · 1 comment · Fixed by #21791
Closed

Advise use of a single options instance in a custom converter #19878

tdykstra opened this issue Aug 6, 2020 · 1 comment · Fixed by #21791
Labels
doc-enhancement Improve the current content [org][type][category] dotnet/svc

Comments

@tdykstra
Copy link
Contributor

tdykstra commented Aug 6, 2020

See dotnet/runtime#40072 and dotnet/runtime#42167 (comment)


Document Details

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

@tdykstra tdykstra added doc-enhancement Improve the current content [org][type][category] P1 and removed ⌚ Not Triaged Not triaged labels Aug 6, 2020
@layomia
Copy link
Contributor

layomia commented Aug 7, 2020

FWI this applies to all usages of JsonSerializerOptions (including at the root calls to the serializer), not just in custom converters.

Another thing to avoid is passing numerous dynamically generated types to the serializer as this can lead to an OutOfMemoryException. An example of this can be found here - dotnet/aspnetcore#24230.

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.

4 participants