JSONDIFF-JDIFF(1)

πŸ“¦ version 2.1.2, in debian trixie, ubuntu resolute, ubuntu stonking

✨ 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