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

Mark JsonNode.WriteTo as obsolete with SYSLIB0060 #111392

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AlexRadch
Copy link
Contributor

Close #108643

This commit introduces the diagnostic ID SYSLIB0060 for the obsolescence of the JsonNode.WriteTo method. Users are advised to use JsonSerializer.Serialize{Async} instead.

The new diagnostic message and ID have been added to the Obsoletions class, and the documentation in list-of-diagnostics.md has been updated accordingly.

The [Obsolete] attribute has been applied to the WriteTo method in JsonArray, JsonNode, JsonObject, and JsonValue.

Additionally, warnings related to the use of the obsolete method have been suppressed in various locations.

This commit introduces the diagnostic ID `SYSLIB0060` for the obsolescence of the `JsonNode.WriteTo` method. Users are advised to use `JsonSerializer.Serialize{Async}` instead.

The new diagnostic message and ID have been added to the `Obsoletions` class, and the documentation in `list-of-diagnostics.md` has been updated accordingly.

The `[Obsolete]` attribute has been applied to the `WriteTo` method in `JsonArray`, `JsonNode`, `JsonObject`, and `JsonValue`.

Additionally, warnings related to the use of the obsolete method have been suppressed in various locations.
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Text.Json community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: JsonNode.WriteTo() with Stream
1 participant