-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
Description
The 'Copy JsonSerializerOptions' section comes right after 'Reuse JsonSerializerOptions instances'. This has been confused as a recommendation to use 'new JsonSerializerOptions(staticInstance)' to reuse JsonSerializerOptions instances. Recommend noting that using this constructor is not the same as a static instance, as the cache of JsonSerializerOptions is not copied to the new one.
dotnet/runtime#30445 (comment)
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 279af375-abfa-e10e-046a-625cc14826be
- Version Independent ID: 1df274ad-ecf0-49e7-90c6-e6f05dce0788
- Content: How to instantiate JsonSerializerOptions with System.Text.Json
- Content Source: docs/standard/serialization/system-text-json-configure-options.md
- Product: dotnet-fundamentals
- GitHub Login: @tdykstra
- Microsoft Alias: tdykstra