Skip to content

Remove Newtonsoft.Json dependency from Benchmarks project#17

Merged
masilver99 merged 2 commits intomasterfrom
copilot/fix-1566c0a0-1094-4b2e-925b-b4db8db4261b
Sep 26, 2025
Merged

Remove Newtonsoft.Json dependency from Benchmarks project#17
masilver99 merged 2 commits intomasterfrom
copilot/fix-1566c0a0-1094-4b2e-925b-b4db8db4261b

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 26, 2025

This PR addresses issue #XX by replacing the unused Newtonsoft.Json dependency with System.Text.Json support.

Changes Made

  • Removed Newtonsoft.Json package reference from Benchmarks/Benchmarks.csproj
  • No code changes were required as the package was not actually being used

Analysis

Upon investigation, I found that:

  1. Newtonsoft.Json was only referenced as a package dependency in the Benchmarks project, but there was no actual usage of Newtonsoft.Json classes or methods anywhere in the codebase
  2. The Benchmarks project only contained JSON string literals used as test data for serialization benchmarks, not actual JSON serialization functionality
  3. System.Text.Json is available by default in .NET 9.0 runtime, so no additional package references are needed should JSON functionality be required in the future

Testing

  • ✅ Solution builds successfully without warnings
  • ✅ Benchmarks project runs correctly and produces expected output
  • ✅ All existing functionality remains intact

This change eliminates a security vulnerability mentioned in the project documentation while maintaining full compatibility. Future JSON serialization needs can leverage the built-in System.Text.Json APIs without any additional dependencies.

Original prompt

This section details on the original issue you should resolve

<issue_title>Swap out Newtonsoft with the System.Text.Json</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #15

💡 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.

Co-authored-by: masilver99 <14352629+masilver99@users.noreply.github.com>
Copilot AI changed the title [WIP] Swap out Newtonsoft with the System.Text.Json Remove Newtonsoft.Json dependency from Benchmarks project Sep 26, 2025
Copilot AI requested a review from masilver99 September 26, 2025 21:51
@masilver99 masilver99 marked this pull request as ready for review September 26, 2025 21:56
@masilver99 masilver99 merged commit 41342ae into master Sep 26, 2025
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.

Swap out Newtonsoft with the System.Text.Json

2 participants