Sunmeat.Diff 1.0.0

dotnet add package Sunmeat.Diff --version 1.0.0
                    
NuGet\Install-Package Sunmeat.Diff -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sunmeat.Diff" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sunmeat.Diff" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Sunmeat.Diff" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sunmeat.Diff --version 1.0.0
                    
#r "nuget: Sunmeat.Diff, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sunmeat.Diff@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sunmeat.Diff&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Sunmeat.Diff&version=1.0.0
                    
Install as a Cake Tool

Sunmeat.Diff logo

Sunmeat.Diff

Every change tells a story.

Compare anything. Understand everything.

Diff compares .NET objects, text, JSON, XML, binary data, files, and directories. It provides structured change paths, reversible patches, and standalone reports.

NuGet CI MIT .NET Support development

Українська

Install

Version 1.0.0 is prepared for release. Build and install it from a local feed before publication. Build and publish

After publication on NuGet.org, install this version using the .NET CLI.

dotnet add package Sunmeat.Diff --version 1.0.0

The core targets .NET 8, 9, 10, and 11. The CI matrix shows verified runtime and OS combinations. Compatibility

Quick start

Compare objects

using Sunmeat.Diff;

var before = new Person("Olena", "Kyiv");
var after = new Person("Olena", "Lviv");
var result = Diff.Compare(before, after);

Console.WriteLine(result.ToText());
result.SaveHtml("comparison.html");

record Person(string Name, string City);

Compare text

using Sunmeat.Diff;

var result = Diff.CompareText("Old title\n", "New title\n");
Console.WriteLine(result.ToUnifiedDiff());

Create, apply, and reverse a JSON patch

using Sunmeat.Diff;

const string before = "{\"published\":false}";
const string after = "{\"published\":true}";
string patch = Diff.CreateJsonPatch(before, after);
string updated = Diff.ApplyJsonPatch(before, patch);
string restored = Diff.ApplyJsonPatch(updated, Diff.ReverseJsonPatch(before, patch));
Console.WriteLine(restored);

Patch a CLR model

using Sunmeat.Diff;

var before = new Document("Draft");
var after = new Document("Published");
var patch = Diff.CreatePatch(before, after);
var updated = Diff.Apply(before, patch);
var restored = Diff.Apply(updated, Diff.Reverse(patch));
Console.WriteLine(restored.Title);

record Document(string Title);

Comparison modes

Input Highlights
Objects and collections Public members, nested values, dictionaries, keyed items, cycle detection, tolerances, custom comparers
Text Lines, words, Unicode scalars, graphemes, unified diff
JSON · XML Structural comparison with bounded inputs
Files, directories, and bytes Cancellable I/O, streaming binary ranges, optional rename and move detection
Patches and reports RFC 6902, reversible CLR-model patches, text, JSON, Markdown, CSV, and offline HTML

Documentation and examples

Getting started · Options · Patches · HTML reports · Security · Benchmarks

Sunmeat ecosystem

Library Purpose
Sunmeat.Prism Serialization in six formats
Sunmeat.Pulse Structured logs and terminal output
Sunmeat.Guard Argument checks and reusable validators
Sunmeat.Diff Data comparison and reversible patches

❤️ Support the project

Sunmeat.Diff is free, open-source software created and maintained by an independent developer.

If Diff saves you time, helps you understand changes, or becomes a valuable part of your projects, consider supporting its continued development.

Building and maintaining free developer tools takes time, effort, and resources.

Your support helps fund:

  • New comparison algorithms and supported data formats.
  • Performance improvements and optimizations.
  • Beautiful reports and developer tools.
  • Documentation, examples, and automated tests.
  • Long-term maintenance and platform compatibility.
  • Development tools, infrastructure, and AI-assisted development subscriptions.
  • New open-source .NET libraries for the community.

Every contribution, regardless of its size, makes a difference.

Even a small donation can help turn the next idea into another free tool for developers.

Support development

Patreon Monobank

Financial support is entirely optional. All library features remain free and open source.

You can also support the project by starring the repository, reporting issues, contributing code, or sharing Diff with other developers.

Star on GitHub Developer website


Built with curiosity. Shared with the community.

Copyright © 2026 Oleksandr Zahoruiko · sunmeat.dev

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 80 11/29/2026

Initial release of Sunmeat.Diff.