GitHub
github.com › relex › json-diff-react
GitHub - relex/json-diff-react: A React.js component that renders a structural diff of two JSON values · GitHub
A React.js component that renders a structural diff of two JSON values. Written in TypeScript except for the JavaScript code inherited from the original json-diff library.
Starred by 8 users
Forked by 2 users
Languages TypeScript 55.5% | JavaScript 39.0% | Shell 4.6%
GitHub
github.com › utkuakyuz › virtual-react-json-diff
GitHub - utkuakyuz/virtual-react-json-diff: A lightweight diff viewer for JSON files in React applications
Starred by 14 users
Forked by 2 users
Languages TypeScript 85.1% | CSS 12.5% | JavaScript 2.4% | TypeScript 85.1% | CSS 12.5% | JavaScript 2.4%
Is there a library that allows to easily do diffchecks between two json?
I mean, you could stringify them both and check if they are equal or not… would be a quick and dirty way. More on reddit.com
reactjs - React library to display unified diff between two strings - Stack Overflow
I am looking for a React component that shows a unified git-like diff between two strings (specifically, two different JSON snippets). Like this: I am currently using the react-ace diff component,... More on stackoverflow.com
Need a component to compare json changes
I recently used react-diff-viewer-continued. For text rather than JSON but it should work fine, especially if the JSON string is formatted. I believe you need to install with the @next dist tag for react 19 support. More on reddit.com
Any react JSONeditor that can highlight difference between two objects?
https://microsoft.github.io/monaco-editor/playground.html#creating-the-diffeditor-navigating-a-diff Monaco has a diff editor, in which I had also used for comparing JSON files. More on reddit.com
GitHub
github.com › bluepeter › jsondiffpatch-react
GitHub - bluepeter/jsondiffpatch-react: Diff & patch JavaScript objects... in React
Based on https://github.com/benjamine/jsondiffpatch ... import React from 'react'; import JsonDiffReact from 'jsondiffpatch-react'; <JsonDiffReact right: PropTypes.any, left: PropTypes.any, show: PropTypes.bool, annotated: PropTypes.bool, tips: PropTypes.any, objectHash: PropTypes.func, />
Starred by 12 users
Forked by 4 users
Languages JavaScript 100.0% | JavaScript 100.0%
GitHub
github.com › udamir › api-diff-viewer
GitHub - udamir/api-diff-viewer: React component to view difference between two Json based API documents · GitHub
Starred by 45 users
Forked by 2 users
Languages TypeScript 98.1% | CSS 1.8% | JavaScript 0.1%
GitHub
github.com › 5SSS › react-json-view-compare
GitHub - 5SSS/react-json-view-compare: compare json data,json viewer(demo:https://codesandbox.io/s/jovial-meadow-v17pw)
import ReactJsonViewCompare from 'react-json-view-compare'; const oldData = { name: 'super', age: 18, task: [ { name: 'eat', time: '09:00' }, { name: 'work', time: '10:00' }, { name: 'sleep', time: '22:00' } ] }; const newData = { name: 'coolapt', age: 20, task: [ { name: 'eat', time: '09:00' }, { name: 'work', time: '10:00' }, { name: 'sleep', time: '23:00' }, { name: 'running', time: '08:00' } ] }; function App() { return <ReactJsonViewCompare oldData={oldData} newData={newData} />; } ReactDOM.render(<App />, document.getElementById('root'));
Starred by 45 users
Forked by 15 users
Languages JavaScript 81.5% | CSS 16.8% | HTML 1.7% | JavaScript 81.5% | CSS 16.8% | HTML 1.7%
GitHub
github.com › benjamine › jsondiffpatch
GitHub - benjamine/jsondiffpatch: Diff & patch JavaScript objects · GitHub
Starred by 5.3K users
Forked by 496 users
Languages TypeScript 94.7% | CSS 2.9% | JavaScript 2.4%
GitHub
github.com › RexSkz › json-diff-kit
GitHub - RexSkz/json-diff-kit: A better JSON differ & viewer, support LCS diff for arrays and recognise some changes as "modification" apart from simple "remove"+"add". · GitHub
import { Differ } from 'json-diff-kit'; // or if you are using vue, you can import the differ only import Differ from 'json-diff-kit/dist/differ'; // the two JS objects const before = { a: 1, b: 2, d: [1, 5, 4], e: ['1', 2, { f: 3, g: null, h: [5], i: [] }, 9], m: [], q: 'JSON diff can\'t be possible', r: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', s: 1024, }; const after = { b: 2, c: 3, d: [1, 3, 4, 6], e: ['1', 2, 3, { f: 4, g: false, i: [7, 8] }, 10], j: { k: 11, l: 12 }, m: [ { n: 1, o: 2 }, { p: 3 }, ], q:
Starred by 209 users
Forked by 17 users
Languages TypeScript 92.7% | Less 4.7% | JavaScript 2.6%
GitHub
github.com › shripatil70 › json-diff-viewer
GitHub - shripatil70/json-diff-viewer: 🧩 JSON Diff Viewer — A lightweight React + TypeScript tool to visually compare two JSON files side-by-side with color-coded differences, live updates, dark/light mode, and zero UI libraries.
🧩 JSON Diff Viewer — A lightweight React + TypeScript tool to visually compare two JSON files side-by-side with color-coded differences, live updates, dark/light mode, and zero UI libraries. - shripatil70/json-diff-viewer
Author shripatil70
GitHub
github.com › utkuakyuz › virtual-react-json-diff › blob › main › README.md
virtual-react-json-diff/README.md at main · utkuakyuz/virtual-react-json-diff
A lightweight diff viewer for JSON files in React applications - virtual-react-json-diff/README.md at main · utkuakyuz/virtual-react-json-diff
Author utkuakyuz
GitHub
github.com › matteotrapani › virtual-react-json-diff-react19
GitHub - matteotrapani/virtual-react-json-diff-react19: A lightweight diff viewer for JSON files in React applications
A lightweight diff viewer for JSON files in React applications - matteotrapani/virtual-react-json-diff-react19
Author matteotrapani
GitHub
github.com › johnwdunn20 › react-jsondiff
GitHub - johnwdunn20/react-jsondiff: Display json diffs in react. Based on jsondiffpatch
Now as it's own module, this component can easily be installed into any react app: ... <JsonDiff oldJson={{ a: 1, b: 2, c: 4, d: ["hello", "world"], nested: { e: 5, f: 6, h: ["goodbye", "world"], i: 8 }, }} currentJson={{ a: 1, b: 2, c: 3, d: ["hello", "everyone"], nested: { e: 5, f: 6, g: 7, h: ["goodbye", "everyone"] }, }} isHidden={false} // set to true to hide unchanged fields, false to show all fields />
Author johnwdunn20
GitHub
github.com › hero-guo › jsondiffpatch-for-react
GitHub - hero-guo/jsondiffpatch-for-react: jsondiffpatch for react
import React from 'react'; import JsonDiffReact from 'jsondiffpatch-for-react'; <JsonDiffReact right: PropTypes.any, left: PropTypes.any, show: PropTypes.bool, annotated: PropTypes.bool, tips: PropTypes.string, objectHash: PropTypes.func, /> left (array, object, string) right (array, object, string) show (bool) you can show/hide unchanged values ·
Starred by 11 users
Forked by 8 users
Languages JavaScript 100.0% | JavaScript 100.0%
Reddit
reddit.com › r/reactjs › is there a library that allows to easily do diffchecks between two json?
r/reactjs on Reddit: Is there a library that allows to easily do diffchecks between two json?
October 13, 2022 -
I am wondering if there's something that allows you to easily display differences between two json like on diffchecker.com. Is there a library that allows you to easily do that?
GitHub
github.com › relex › json-diff-react › blob › main › README.md
json-diff-react/README.md at main · relex/json-diff-react
A React.js component that renders a structural diff of two JSON values - json-diff-react/README.md at main · relex/json-diff-react
Author relex
Top answer 1 of 2
8
Try either "react-diff-view" or "react-diff-viewer".
The "react-diff-viewer" is quite simple to use/implement while the "react-diff-view" offers some more advanced features.
It's up to you, here the links: https://www.npmjs.com/package/react-diff-viewer https://www.npmjs.com/package/react-diff-view
2 of 2
7
react-diff-viewer-continued might be what you are looking for since 'react-diff-view' is no longer having updates and is not compactable for react 18^.
GitHub
github.com › praneshr › react-diff-viewer
GitHub - praneshr/react-diff-viewer: A simple and beautiful text diff viewer component made with Diff and React.
import React, { PureComponent } from 'react'; import ReactDiffViewer from 'react-diff-viewer'; const oldCode = ` const a = 10 const b = 10 const c = () => console.log('foo') if(a > 10) { console.log('bar') } console.log('done') `; const newCode = ` const a = 10 const boo = 10 if(a === 10) { console.log('bar') } `; class Diff extends PureComponent { highlightSyntax = str => ( <span style={{ display: 'inline' }} dangerouslySetInnerHTML={{ __html: Prism.highlight(str, Prism.languages.javascript), }} /> ); render = () => { const newStyles = { variables: { dark: { highlightBackground: '#fefed5', hi
Starred by 1.6K users
Forked by 309 users
Languages TypeScript 96.3% | JavaScript 3.1% | Shell 0.6% | TypeScript 96.3% | JavaScript 3.1% | Shell 0.6%
npm
npmjs.com › package › react-json-view-compare
react-json-view-compare - npm
Latest version: 2.0.2, last published: 3 years ago. Start using react-json-view-compare in your project by running `npm i react-json-view-compare`. There are 7 other projects in the npm registry using ...
» npm install react-json-view-compare
Published Mar 30, 2023
Version 2.0.2
Author coolapt