update llms.txt file for System.Text.Json#52302
update llms.txt file for System.Text.Json#52302kartheekp-ms wants to merge 6 commits intollmstxtfrom
Conversation
Added detailed information about new features in .NET 10 related to System.Text.Json, best practices in llms.txt file
Removed detailed sections about `JsonSerializerOptions.Strict`, `AllowDuplicateProperties`, `PipeReader` support, and `ReferenceHandler` from the documentation and added a link to the official doc.
Added new APIs and features introduced in .NET 10 for JSON serialization, including best-practice presets and options for handling duplicate properties.
| - **Prefer `Strict` for new projects.** The `Strict` preset catches common mistakes (unmapped members, duplicate keys, null violations) at deserialization time rather than silently ignoring them. | ||
| - **Serialize to UTF-8 when possible.** `SerializeToUtf8Bytes()` is 5–10% faster than string-based serialization because it avoids UTF-16 conversion. | ||
|
|
||
| ## Topics |
There was a problem hiding this comment.
Do we need all these topics? Would removing all of these reduce token usage for the corresponding evaluation while maintaining accuracy and perf improvements? If not, what's the minimal set?
There was a problem hiding this comment.
It is hard to finalize list of topics without evaluating how Copilot handles related tasks with and without these topics. Maybe we can use learn.microsoft.com metrics and add links to frequently visited topics.
| ## What's New in .NET 10 | ||
|
|
||
| **.NET 10 adds:** `JsonSerializerOptions.Strict` preset for best-practice defaults, `AllowDuplicateProperties` option to reject duplicate JSON properties, `PipeReader` deserialization support, and `ReferenceHandler` in `JsonSourceGenerationOptions`. | ||
| The following APIs were added in .NET 10: |
There was a problem hiding this comment.
Any breaking changes in addition to new APIs?
There was a problem hiding this comment.
Great feedback. I just noticed that there were couple of breaking changes in System.Text.Json as per docs https://learn.microsoft.com/en-us/dotnet/core/compatibility/10#serialization. I will add them to this file.
There was a problem hiding this comment.
Added breaking changes to this file in the latest commit.
Added new APIs and breaking changes for .NET 10 serialization.
Updated the description of property name conflict validation to suggest renaming conflicting properties.
No description provided.