Skip to content

Latest commit

 

History

History
75 lines (58 loc) · 950 Bytes

File metadata and controls

75 lines (58 loc) · 950 Bytes

Output Formats

JSON Output

Machine-readable JSON output for automation.

$ diffx --output json tests/fixtures/file1.json tests/fixtures/file2.json
? 1
[
  {
    "Modified": [
      "age",
      30,
      31
    ]
  },
  {
    "Modified": [
      "city",
      "New York",
      "Boston"
    ]
  },
  {
    "Added": [
      "items[2]",
      "orange"
    ]
  }
]

YAML Output

$ diffx --output yaml tests/fixtures/file1.json tests/fixtures/file2.json
? 1
- Modified:
  - age
  - 30
  - 31
- Modified:
  - city
  - New York
  - Boston
- Added:
  - items[2]
  - orange

Brief Mode

Only report whether files differ.

$ diffx --brief tests/fixtures/file1.json tests/fixtures/file2.json
? 1
Files tests/fixtures/file1.json and tests/fixtures/file2.json differ

Quiet Mode

Exit code only, no output.

$ diffx --quiet tests/fixtures/file1.json tests/fixtures/file2.json
? 1