MintPlayer.ValueComparers.NewtonsoftJson
10.20.2
dotnet add package MintPlayer.ValueComparers.NewtonsoftJson --version 10.20.2
NuGet\Install-Package MintPlayer.ValueComparers.NewtonsoftJson -Version 10.20.2
<PackageReference Include="MintPlayer.ValueComparers.NewtonsoftJson" Version="10.20.2" />
<PackageVersion Include="MintPlayer.ValueComparers.NewtonsoftJson" Version="10.20.2" />
<PackageReference Include="MintPlayer.ValueComparers.NewtonsoftJson" />
paket add MintPlayer.ValueComparers.NewtonsoftJson --version 10.20.2
#r "nuget: MintPlayer.ValueComparers.NewtonsoftJson, 10.20.2"
#:package MintPlayer.ValueComparers.NewtonsoftJson@10.20.2
#addin nuget:?package=MintPlayer.ValueComparers.NewtonsoftJson&version=10.20.2
#tool nuget:?package=MintPlayer.ValueComparers.NewtonsoftJson&version=10.20.2
MintPlayer.ValueComparers.NewtonsoftJson
A value-comparer for Newtonsoft.Json.Linq.JObject, for use in incremental source generators.
Why this exists
An incremental generator only skips work when it can tell that its inputs are unchanged, and it
decides that with IEqualityComparer<T>. JObject compares by reference, so a model carrying one
looks different on every single run — the generator re-runs, and the caching that makes
incremental generators fast is silently lost.
This package registers a comparer that compares two JObjects by their compact serialized form,
so equal JSON compares equal.
Usage
Register once, from a module initializer in your generator:
using MintPlayer.ValueComparers.NewtonsoftJson;
internal static class Comparers
{
[ModuleInitializer]
internal static void Register() => JObjectValueComparer.Register();
}
From then on, anything that resolves comparers through
MintPlayer.SourceGenerators.Tools' ComparerRegistry — including the comparers written by
MintPlayer.ValueComparerGenerator
— will use it for JObject members.
Register() uses TryRegister, so it will not overwrite a comparer you registered yourself, and
calling it more than once is harmless.
Related packages
- MintPlayer.SourceGenerators.Tools — the base
ValueComparer<T>and the registry this plugs into - MintPlayer.ValueComparerGenerator — generates value-comparers for your own model types
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- MintPlayer.SourceGenerators.Tools (>= 10.21.0)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MintPlayer.ValueComparers.NewtonsoftJson:
| Package | Downloads |
|---|---|
|
MintPlayer.SourceGenerators
This package contains several source generators |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.20.2 | 170 | 8/27/2026 |
| 10.20.1 | 115 | 8/27/2026 |
| 10.20.0 | 764 | 6/5/2026 |
| 10.19.0 | 921 | 4/3/2026 |
| 10.13.0 | 1,281 | 1/19/2026 |
| 10.10.1 | 288 | 1/12/2026 |
| 10.10.0 | 179 | 1/12/2026 |
| 10.9.0 | 176 | 1/12/2026 |
| 10.8.0 | 254 | 12/24/2025 |
| 10.7.0 | 371 | 11/13/2025 |
| 10.5.0 | 523 | 11/11/2025 |
| 10.4.0 | 346 | 11/10/2025 |
| 10.3.0 | 288 | 11/6/2025 |
| 10.2.0 | 268 | 11/6/2025 |
| 10.1.0 | 257 | 11/5/2025 |
| 10.0.1 | 267 | 11/2/2025 |
| 10.0.0 | 261 | 11/2/2025 |
| 9.2.1 | 239 | 10/31/2025 |
| 9.1.0 | 242 | 10/21/2025 |
| 9.0.0 | 247 | 10/20/2025 |