Skip to content

Commit 0c9f648

Browse files
author
Kevin Paulisse
committed
Add JSON filter to octocatalog-diff documentation
1 parent e156b9d commit 0c9f648

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

doc/advanced-filter.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Please note that there are other options to ignore specified diffs, including:
1010
Here is the list of available filters and an explanation of each:
1111

1212
- [Absent File](/doc/advanced-filter.md#absent-file) - Ignore parameter changes of a file that is declared to be absent
13+
- [JSON](/doc/advanced-filter.md#json) - Ignore whitespace differences if JSON parses to the same object
1314
- [YAML](/doc/advanced-filter.md#yaml) - Ignore whitespace/comment differences if YAML parses to the same object
1415

1516
## Absent File
@@ -69,6 +70,20 @@ Wouldn't it be nice if the meaningless information didn't appear, and all you sa
6970
+ absent
7071
```
7172

73+
## JSON
74+
75+
#### Usage
76+
77+
```
78+
--filters JSON
79+
```
80+
81+
#### Description
82+
83+
If a file resource has extension `.json` and a difference in its content is observed, JSON objects are constructed from the previous and new values. If these JSON objects are identical, the difference is ignored.
84+
85+
This allows you to ignore changes in whitespace, comments, etc., that are not meaningful to a machine parsing the file. Note that changes to files may still trigger Puppet to restart services even though these changes are not displayed in the octocatalog-diff output.
86+
7287
## YAML
7388

7489
#### Usage
@@ -81,4 +96,4 @@ Wouldn't it be nice if the meaningless information didn't appear, and all you sa
8196

8297
If a file resource has extension `.yml` or `.yaml` and a difference in its content is observed, YAML objects are constructed from the previous and new values. If these YAML objects are identical, the difference is ignored.
8398

84-
This allows you to ignore changes in whitespace, comments, etc., that are not meaningful to a machine parsing the file. Please note that by filtering these changes, you are ignoring changes to comments, which may be meaningful to humans.
99+
This allows you to ignore changes in whitespace, comments, etc., that are not meaningful to a machine parsing the file. Please note that by filtering these changes, you are ignoring changes to comments, which may be meaningful to humans. Also, changes to files may still trigger Puppet to restart services even though these changes are not displayed in the octocatalog-diff output.

0 commit comments

Comments
 (0)