Skip to content

Migrate JsonPatch from Newtonsoft to System.Text.Json #671

Merged
KrzysztofPajak merged 3 commits intodevelopfrom
refactor/jsonpatch-migrate-to-systemtextjson
Apr 1, 2026
Merged

Migrate JsonPatch from Newtonsoft to System.Text.Json #671
KrzysztofPajak merged 3 commits intodevelopfrom
refactor/jsonpatch-migrate-to-systemtextjson

Conversation

@KrzysztofPajak
Copy link
Copy Markdown
Member

@KrzysztofPajak KrzysztofPajak commented Apr 1, 2026

  • Fix appsettings.json comments for FrontendAPI: updated /scalar/ to /scalar/v2 and added Development-only note
  • Fix appsettings.json comments for BackendAPI: updated /scalar/ to /scalar/v1 and added Development-only note

Copilot AI review requested due to automatic review settings April 1, 2026 18:35
@KrzysztofPajak KrzysztofPajak changed the title Migrate JsonPatch from Newtonsoft to System.Text.Json (.NET… Migrate JsonPatch from Newtonsoft to System.Text.Json Apr 1, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the API module to use JSON Patch with System.Text.Json instead of Newtonsoft-based infrastructure, along with minor OpenAPI-related robustness tweaks.

Changes:

  • Replaces Newtonsoft JSON Patch dependencies with Microsoft.AspNetCore.JsonPatch.SystemTextJson and updates controllers to the new namespace.
  • Removes the previous Newtonsoft JSON Patch input formatter wiring/helper.
  • Hardens IgnoreFieldSchemaTransformer against null/collection-modification issues and updates appsettings comments around Scalar docs.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Web/Grand.Web/App_Data/appsettings.json Enables the API module and adds comments for Scalar doc URLs.
src/Modules/Grand.Module.Api/Infrastructure/Transformers/IgnoreFieldSchemaTransformer.cs Adds null checks and materializes keys before removal.
src/Modules/Grand.Module.Api/Infrastructure/OpenApiStartup.cs Removes Newtonsoft JsonPatch input formatter registration.
src/Modules/Grand.Module.Api/Grand.Module.Api.csproj Swaps JsonPatch/Newtonsoft packages for SystemTextJson JsonPatch package.
src/Modules/Grand.Module.Api/Extensions/ServiceCollectionExtensions.cs Removes the Newtonsoft JsonPatch input formatter helper.
src/Modules/Grand.Module.Api/Controllers/*.cs Updates JsonPatch using directives to ...SystemTextJson.
Directory.Packages.props Central package version updates for JsonPatch migration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… Development-only constraint

Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/cf4ebe9c-d4e9-42da-b121-a5406393ef5d

Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@KrzysztofPajak KrzysztofPajak merged commit 9b9f843 into develop Apr 1, 2026
6 checks passed
@KrzysztofPajak KrzysztofPajak deleted the refactor/jsonpatch-migrate-to-systemtextjson branch April 1, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants