benjamine/jsondiffpatch

Diff & patch JavaScript objects

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 16 minutes ago
Added to GitGenius on September 12th, 2026
Created on October 22nd, 2011
Open Issues & Pull Requests: 54 (+0)
GitHub issues: Enabled
Number of forks: 496
Total Stargazers: 5,340 (+0)
Total Subscribers: 81 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 109.7 days
Mean response time: 635.9 days
90th percentile: 2396.8 days
Tracked items: 68

Most active contributors

Sign in to see contributor activity.

How this project is maintained

100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Three people close 100% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 20
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 924 days
Stale 30+ days: 20
Stale 90+ days: 18

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (4)
  • todo (3)
  • featurereq (2)
  • rfc6902 (2)
  • hacktoberfest (1)
  • text diff-match-patch (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

jsondiffpatch is a library for computing diffs and applying patches to JavaScript objects.

The tool solves the problem of tracking changes between two versions of a JavaScript object by computing a delta—a compact representation of what changed. It uses longest common subsequence matching for arrays, allowing smart comparison of array elements when an objectHash function is provided to identify which objects correspond across versions. For long strings, it optionally applies character-level diffing. The delta can then be used to patch an object forward to a new state or reversed to revert it to a previous state.

Developers should choose this tool when they need to track object mutations compactly, such as in collaborative editing, undo/redo systems, or change logging. It works well for projects that serialize state as JSON and need to transmit or store only the differences rather than full snapshots. The library produces multiple output formats including a compact JSON delta format, visual HTML diffs, RFC 6902 JSON Patch format, and colored console output. At roughly 16KB minified and gzipped, it is lightweight enough for browser use. The tool requires providing an objectHash function when diffing arrays of objects to achieve meaningful results; without it, array comparison falls back to position-based matching.

The project maintains active continuous integration on its master branch. Development activity shows consistent engagement with the codebase through regular updates and testing infrastructure.