Remove JsonReader and JsonWriter - #124
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the project’s custom JSON reader/writer implementations from LuYao.Common (namespace LuYao.Text.Json) along with their dedicated unit tests, effectively eliminating these APIs from the library surface.
Changes:
- Deleted
JsonWriterimplementation fromLuYao.Common. - Deleted
JsonReaderimplementation (including the customJsonExceptiontype defined in that file). - Removed the corresponding unit test suites for
JsonWriterandJsonReader.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/LuYao.Common.UnitTests/Text/Json/JsonWriterTests.cs | Removed unit tests for the custom JsonWriter API. |
| tests/LuYao.Common.UnitTests/Text/Json/JsonReaderTest.cs | Removed unit tests for the custom JsonReader API. |
| src/LuYao.Common/Text/Json/JsonWriter.cs | Removed the public JsonWriter implementation (breaking API surface change). |
| src/LuYao.Common/Text/Json/JsonReader.cs | Removed the public JsonReader implementation and the custom JsonException type (breaking API surface change). |
Suppressed comments (2)
src/LuYao.Common/Text/Json/JsonReader.cs:1
- Removing the public JsonReader (and the LuYao.Text.Json.JsonException type defined in the same file) is a breaking change for library consumers and can also change exception contracts. If the intent is to standardize on System.Text.Json, consider leaving compatibility shims marked [Obsolete] for at least one release, or ensure the package versioning and migration notes explicitly call out these removals.
src/LuYao.Common/Text/Json/JsonWriter.cs:1 - Removing the public JsonWriter API from LuYao.Common is a breaking change for any downstream consumers that used LuYao.Text.Json.JsonWriter. If this removal is intentional, consider providing a transition path (e.g., keep a thin wrapper marked [Obsolete] that delegates to System.Text.Json/Newtonsoft, or postpone removal to a major-version bump and document it in release notes).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.