Skip to content
sunmeatPublic

About

Every change tells a story. Compare objects, text, structured data and files with reversible patches and detailed reports.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Current release: 1.0.0. Install from NuGet or build and install locally. Build and publish

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

Independent .NET libraries with a shared philosophy: simple APIs, modularity and open source.

Library Purpose NuGet / Status
Sunmeat.Prism Serialization and format conversion NuGet
Sunmeat.Pulse Structured logging NuGet
Sunmeat.Nexus HTTP requests and API communication NuGet
Sunmeat.Lens Code analysis and architecture visualization NuGet · Roslyn · Raster
Sunmeat.Guard Validation and argument checks NuGet
Sunmeat.Diff (this project) Data comparison and patches NuGet
Sunmeat.Morph Object mapping and transformation NuGet
Sunmeat.Forge Synthetic data and test fixtures NuGet
Sunmeat.Signal Multichannel notifications NuGet · Extensions.DependencyInjection
Sunmeat.Vault Cryptography and secret storage NuGet
Sunmeat.Portal File systems, storage and backups NuGet
Sunmeat.Scribe Document generation and processing In development
Sunmeat.Flux In-process Mediator, CQRS and Event Bus In development
Sunmeat.Synapse Unified AI API and model routing In development

All published packages · Ecosystem website


❤️ 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 Star on GitHub Developer website

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.


Built with curiosity. Shared with the community.

Copyright © 2026 Oleksandr Zahoruiko · sunmeat.dev

About

Every change tells a story. Compare objects, text, structured data and files with reversible patches and detailed reports.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages