JSON Analyzer
The JSON analyzer is a very simple analyzer of JSON files based on the Jackson Analyzer Base.
Configuration
This analyzer only provides the configuration properties of the base jackson analyzer.
Examples
To analyze a file encoded in UTF-16, you can use the following configuration:
<revapi.json>
<charset>UTF-16</charset>
</revapi.json>
To look for a specific file (META-INF/config.json) with in ZIPs that are provided as archives, you can do this:
<revapi.json>
<pathRegex>/META-INF/config\.json</pathRegex>
</revapi.json>
Detected differences
There is not much this analyzer can detect in the JSON files - merely additions, removals and changes.
JSON node added - json.added
Binary severity |
NA |
Source severity |
NA |
Semantic severity |
potentially breaking |
This is reported on JSON nodes that have been added in the new version of the API (the file). Primitive values, object nodes, array nodes as well as individual elements within the objects or arrays are supported.
Match parameters | |
---|---|
|
the file (if within a ZIP archive) in which the difference has been found |
|
the JSON path to the added element within the file |
JSON node removed - json.removed
Binary severity |
NA |
Source severity |
NA |
Semantic severity |
breaking |
This is reported on JSON nodes that have been removed from the new version of the API (the file). Primitive values, object nodes, array nodes as well as individual elements within the objects or arrays are supported.
Match parameters | |
---|---|
|
the file (if within a ZIP archive) in which the difference has been found |
|
the JSON path to the added element within the file |
JSON node changed - json.changed
Binary severity |
NA |
Source severity |
NA |
Semantic severity |
potentially breaking |
This is reported on JSON nodes that have been changed in the new version of the API (the file). Primitive values, object nodes, array nodes as well as individual elements within the objects or arrays are supported.
Match parameters | |
---|---|
|
the file (if within a ZIP archive) in which the difference has been found |
|
the JSON path to the added element within the file |
|
the value as it was present in the old version |
|
the value as it is present in the new version |