# benjamine/jsondiffpatch

Diff & patch JavaScript objects

Repository: https://github.com/benjamine/jsondiffpatch
Canonical: https://ross.abutalabs.com/products/jsondiffpatch
Homepage: https://jsondiffpatch.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: json, diff, patch, text-diff, jsondiffpatch, delta, diffing
Last push: 2026-05-14T22:54:47+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 82, release rhythm 8, longevity 100
- inputs: {"age_days": 5430, "days_push": 111, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5336, forks 496 (observed 2026-08-28T04:09:15.790640+00:00)

## What it is
A TypeScript library for deep diffing and patching JavaScript objects, with smart array diffing via LCS, text diffing for long strings, and delta reversal/unpatching. It supports multiple output formats including a compact JSON delta format, HTML visual diffs, JSON Patch (RFC 6902), and a CLI for comparing files or URLs.

## Use cases
- diff two  files from the command line
- compare javascript objects and generate a patch
- apply and revert  deltas to patch objects
- show a visual html diff of two  documents
- generate rfc 6902  patch from two objects
- diff arrays of objects by id instead of position
- compare  from a gist or http url

## When to choose
- you need deep structural diffing of JavaScript objects or JSON, including smart array matching
- you want to serialize, apply, and reverse deltas for state synchronization or undo/redo
- you need multiple diff output formats (delta, JSON Patch, HTML visual, console) in one small (~16KB) package

## When to avoid
- you only need simple string or line-based text diffs without object awareness
- you need diffing of non-JSON binary or arbitrary file formats
- you require a language other than JavaScript/TypeScript

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools, cli
- domain: developer-tools, files, web-development
- platform: browser, cli, cross-platform
- tags: -diff, -patch, delta-format, array-diffing, text-diff, visual-diff, typescript, nodejs

## Member repositories
- benjamine/jsondiffpatch (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:15.790640+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:58:51.371758+00:00, confidence not recorded.
  - readme: https://github.com/benjamine/jsondiffpatch (fetched 2026-08-28T04:09:15.790640+00:00, sha 95c95cdea7b4)
  - homepage: https://jsondiffpatch.com (fetched 2026-08-29T08:53:39.680593+00:00, sha 27302f3b14e6)
  - registry_npm: https://registry.npmjs.org/jsondiffpatch (fetched 2026-08-29T08:53:39.682940+00:00, sha fe90845b733c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
