GR0064: Do not use new instances of JsonSerializerOptions. Reuse existing instances for better performance.
| Title | Do not use new instances of JsonSerializerOptions. Reuse existing instances for better performance. |
|---|---|
| Id | GR0064 |
| Category | Performance |
| Default Severity | Warning |
| Enabled By Default | True |
| Description | Reuse JsonSerializerOptions instances for better performance. Creating new instances repeatedly causes the metadata cache to be rebuilt each time. The metadata caches on the options instance are thread-safe, and the instance is immutable after the first serialization or deserialization. |
| Custom Tags |