Skip to content

update llms.txt file for System.Text.Json#52302

Draft
kartheekp-ms wants to merge 7 commits intollmstxtfrom
dev-kmps-update-stj-llms.txt
Draft

update llms.txt file for System.Text.Json#52302
kartheekp-ms wants to merge 7 commits intollmstxtfrom
dev-kmps-update-stj-llms.txt

Conversation

@kartheekp-ms
Copy link
Contributor

No description provided.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

@kartheekp-ms kartheekp-ms Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I have removed topics from the file.

Added new APIs and breaking changes for .NET 10 serialization.
Updated the description of property name conflict validation to suggest renaming conflicting properties.
Reinstate the note about serializing to UTF-8 for performance benefits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants