JSONDIFF-JDIFF(1)
β¨ JSONDIFF-JDIFF β¨
okay bestie, pull up a chair π«Ά you're looking at jsondiff-jdiff, from the User Commands section of the manual, and it is literally the moment your JSON comparison life changes. no cap.
π NAME π
jsondiff-jdiff β compare JSON and JSON-like structures. that's it. that's the whole vibe. πΈ
π¦ SYNOPSIS π¦
jsondiff-jdiff [-s SYNTAX] [-i N] base-file target-file
jsondiff-jdiff [-s SYNTAX] [-i N] --patch base-file patch-file
jsondiff-jdiff -h
look at her. three whole ways to call her. main character energy fr fr π
π DESCRIPTION π
so basically: she takes two JSON files and hands you back a JSON representation of the differences between them. like, the diff, but make it JSON. iconic.
those differences get represented according to whichever syntax you picked, and you can pretty-print the whole thing with whatever indentation you want. chef's kiss π
and here's the plot twist: if you'd rather apply changes instead of just staring at them, the --patch option flips the whole script β instead of producing a difference, she takes the changes described by a JSON diff and applies them to a JSON file. it's giving glow-up. β¨
π POSITIONAL ARGUMENTS π
base-fileβ the first JSON file to compare. this one is the source or base file, the origin story, the before pic πΈtarget-fileβ the second JSON file to compare. this is the target or comparison file, the after pic π¦patch-fileβ the jsondiff patch file to apply. heads up: this one is only used with--patch. no--patch, no patch-file, no exceptions π«
π OPTIONS π
-h,--helpβ show a help message and exit. she's helpful like that π-p,--patchβ instead of producing a difference file, apply the differences from the second file to the first file. the plot twist option, the one that actually does stuff π₯-s SYNTAX,--syntax SYNTAXβ define the output syntax. the available options are"compact","symmetric", and"explicit". the default is"compact". choose your fighter β-i INDENT,--indent INDENTβ set the number of spaces for indentation in the output JSON. by default, no indentation is applied to the output JSON β so if you want it pretty, bestie, you gotta ask for it π
ngl, if you skip -i entirely you're getting a wall of JSON. valid, but chaotic. just saying. π
and that's the whole page, babe. this was jsondiff-jdiff 2.0.0, dated May 2023 β yes, the version and the date, we're giving credit where credit is due π go forth and diff responsibly, bestie. you ate. periodt. ππ§ββοΈ
π¦ where this page comes from
- debian trixie: python3-jsondiff 2.1.2-1 Β· MIT
- ubuntu resolute: python3-jsondiff 2.1.2-1 Β· MIT
- ubuntu stonking: python3-jsondiff 2.1.2-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms