Migrate from Newtonsoft.Json to System.Text.Json with Source Generation - #85
Open
Lakritzator with Copilot wants to merge 5 commits into
Open
Lakritzator with Copilot wants to merge 5 commits into
Lakritzator with Copilot wants to merge 5 commits into
Conversation
|
|
… core files Co-authored-by: Lakritzator <708125+Lakritzator@users.noreply.github.com>
Co-authored-by: Lakritzator <708125+Lakritzator@users.noreply.github.com>
Co-authored-by: Lakritzator <708125+Lakritzator@users.noreply.github.com>
Member
|
@copilot What about using source generation? |
Copilot
AI
changed the title
[WIP] Replace json.net with System.Text.Json
Migrate from Newtonsoft.Json to System.Text.Json
Dec 24, 2025
Co-authored-by: Lakritzator <708125+Lakritzator@users.noreply.github.com>
Contributor
Author
Added source generation support in commit fa0d8eb. Created |
Copilot
AI
changed the title
Migrate from Newtonsoft.Json to System.Text.Json
Migrate from Newtonsoft.Json to System.Text.Json with Source Generation
Dec 25, 2025
Lakritzator
marked this pull request as ready for review
December 25, 2025 00:05
This branch has not been deployed
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.
Replaced JSON.NET with System.Text.Json throughout the library to use modern .NET serialization and eliminate security vulnerabilities.
Changes
Dependencies
System.Text.Json 9.0.1(fixes CVE in 8.0.4)Newtonsoft.Json 13.0.3Dapplo.HttpExtensions.JsonNet 1.1.2Attribute Migration (100+ entity files)
[JsonProperty("name")]→[JsonPropertyName("name")][JsonObject]→ removed (unnecessary in System.Text.Json)StringEnumConverter→JsonStringEnumConverterCustomDateTimeOffsetConverter→JiraDateTimeOffsetConverterCore Infrastructure
SystemTextJsonSerializer : IJsonSerializerto replaceJsonNetJsonSerializerJiraJsonSerializerOptionsfor shared serialization configurationJiraJsonContextwith source generation support for .NET 6+ (AOT-friendly, high-performance)JiraClientto use new serializerSource Generation
Code Patterns
Dependency Impact
System.Text.Json is now required:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.