Skip to content

Removed Newtonsoft.Json in favor of System.Text.Json #725

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

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

xperiandri
Copy link
Collaborator

@xperiandri xperiandri commented Jul 1, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 13:59
Copy link

@Copilot 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

This PR removes the dependency on Newtonsoft.Json across the solution and migrates to System.Text.Json.

  • Removes Newtonsoft.Json package references from project files.
  • Updates JSON deserialization in the configuration module to use System.Text.Json.
  • Updates Directory.Packages.props and CHANGELOG to reflect the changes.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/FSharpLint.Core/FSharpLint.Core.fsproj Removed Newtonsoft.Json package reference
src/FSharpLint.Core/Application/Configuration.fs Replaced Newtonsoft.Json usage with System.Text.Json and updated JSON configuration
src/FSharpLint.Console/FSharpLint.Console.fsproj Removed Newtonsoft.Json package reference
Directory.Packages.props Replaced Newtonsoft.Json package reference with System.Text.Json package
CHANGELOG.md Updated changelog to document the removal of Newtonsoft.Json
Comments suppressed due to low confidence (1)

src/FSharpLint.Core/Application/Configuration.fs:562

  • Switching to System.Text.Json is a good move; however, ensure that any F# option types used in Configuration are properly handled, as System.Text.Json does not natively support F# option serialization.
        JsonSerializer.Deserialize<Configuration>(configText, FSharpJsonConverter.jsonOptions)

@xperiandri xperiandri force-pushed the remove-newtonsoft.json branch from 2f630cf to fe7b48a Compare July 6, 2025 21:39
@xperiandri xperiandri force-pushed the remove-newtonsoft.json branch from fe7b48a to 75c9a5e Compare July 6, 2025 21:44
@xperiandri xperiandri merged commit b090a0b into master Jul 6, 2025
7 of 8 checks passed
@xperiandri xperiandri deleted the remove-newtonsoft.json branch July 6, 2025 21:54
xperiandri added a commit that referenced this pull request Jul 11, 2025
## [0.25.0] - 2025-07-11

- Migrate from `Paket` to `Directory.Packages.props` #722 [@xperiandri]
- Migrate to .NET `9.0.201` and FCS `43.9.201` #722 [@xperiandri]
- Write test logs to test context output #722 [@xperiandri]
- Use string interpolation instead of `+` concatenation #724 [@xperiandri]
- Run tests in parallel #728 [@xperiandri]
- Remove `NoPartialFunctions` compiler workaround (#698) [@webwarrior-ws]
- Add `SLNX` and `SLNF` format support and migrate to SLNX solution #723 [@xperiandri]
  Remove `Ionide.ProjInfo.Sln` NuGet package dependency
- Remove `Newtonsoft.Json` NuGet dependency #725 [@xperiandri]
- Add missing rule checks for FL0079-FL0081 #713 [@BennieCopeland]
- Modify `.gitignore` to the Visual Studio standard one #735 [@xperiandri]
- Add basic Copilot instructions and GitHub MCP #726 [@xperiandri]
- Migrate `Fornax` to `0.16.0-beta002` and `FSharp.Formatting` to `20.0.1` #736 [@xperiandri, @Numpsy]
- Update the build instructions to use `dotnet fsi` instead of `fake-cli` #734 [@Numpsy]
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.

1 participant