Repository navigation
Add NuGetVersionStjConverter - #7358
Merged
Merged
Conversation
Nigusu-Allehu
force-pushed
the
dev-nyenework-stj-nuget-version-converter
branch
from
May 6, 2026 22:34
f1a0103 to
b656dd9
Compare
Nigusu-Allehu
marked this pull request as ready for review
May 7, 2026 00:24
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a System.Text.Json converter for NuGetVersion as part of the ongoing Newtonsoft.Json → STJ migration in NuGet.Protocol, plus unit tests to validate parity for common inputs.
Changes:
- Introduce
NuGetVersionStjConverterto deserializeNuGetVersionfrom JSON strings (and numeric tokens for NSJ parity). - Add unit tests comparing NSJ and STJ behavior for valid inputs and invalid token types.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/NuGet.Core/NuGet.Protocol/Converters/NuGetVersionStjConverter.cs | Adds the STJ converter implementation for NuGetVersion read/write. |
| test/NuGet.Core.Tests/NuGet.Protocol.Tests/Converters/NuGetVersionStjConverterTests.cs | Adds tests validating STJ behavior and NSJ parity for typical inputs. |
…nverter Agent-Logs-Url: https://github.com/NuGet/NuGet.Client/sessions/78a33919-f1e8-47d2-aaf4-bb2f7fc481fc Co-authored-by: Nigusu-Allehu <[email protected]>
Contributor
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
nkolev92
approved these changes
May 7, 2026
donnie-msft
approved these changes
May 7, 2026
This was referenced May 14, 2026
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.
Bug
Fixes: NuGet/Home#14881
Description
This is a focused slice of #7301, split per-converter to make reviewing easier.
Converters are being migrated first so that the upcoming Registration resource migrations don't become bloated PRs.
NuGetVersionStjConverterdeserializesNuGetVersionfrom JSON strings (and numeric tokens for parity with NSJ), returning null for null inputs and throwing on unexpected token types. Used by version properties on protocol model classes.PR Checklist