Compare json files
Built a Tool for Deep JSON Comparison - Seeking Input on Array Diff Visualization
Compare-Json
Automate JSON compare
Say I have 2 json files.
#1
{
"ID": 1,
"Value": "A"
}
{
"ID": 2,
"Value": "B",
}
#2
{
"ID": 2,
"Value": "B"
},
{
"ID": 1,
"Value": "A",
}
I would like a compare that says these 2 files are the same.
Just because they are not in the same order they are not different.
Are there any tools that will tell me they are the same?
thanks
Hey r/golang community,
I've been grappling with a recurring challenge in my work: comparing large, deeply nested JSON files. To tackle this, I created a CLI tool in Go that helps highlight differences between two JSON files with high precision.
The tool is relatively compact, about 200 lines of code, and handles different types of changes well, including additions, deletions, and type mismatches. However, I'm looking to improve how differences within arrays are displayed. Currently, if an item at the beginning of an array is modified or removed, all subsequent items are marked as changed, which isn't very helpful for quick analysis.
Here's where I could use your collective wisdom:
Visualization Techniques: Does anyone have suggestions for more intuitive ways to display array differences? Maybe a method that effectively pinpoints and isolates changes without cascading the entire array?
Code Feedback: I'd love to get some feedback on the implementation. I'm sure there are optimizations and best practices that I could apply to enhance the tool's performance and usability.
I'm looking forward to your insights and suggestions. Let's make JSON comparisons easier for everyone!
You can check out the tool and contribute here: https://github.com/phplego/jcmp
Thank you all in advance!