Compare a JSON baseline with a YAML configuration
Admin ·
A structural comparison follows the parsed names, types and values in a configuration. Use it to review setting changes when whitespace, comments or the file format also changed.
JSON and YAML Diff Highlighter
Find the service and feature changes
Choose Load example, then Compare configurations. The baseline is JSON and the target is YAML. The comparison reports one addition, one removal, four changes and one unchanged path.
The baseline version 1.0 and the target version 1 compare as equal numbers. The region setting is removed and the zone is added. The replicas value changes from 2 to 3. The two feature values switch positions, producing a change at each index.
| Path | Result with positional arrays |
|---|---|
| /service/replicas | Changed from 2 to 3 |
| /service/region | Removed |
| /service/zone | Added |
| /features/0 and /features/1 | Both changed |
RFC 8259, The JSON Data Interchange FormatYAML 1.2.2, Core SchemaRFC 6901, JSON Pointer Syntax
Compare the feature list as a set
Enable Treat primitive arrays as sets and compare again. Now there are two changed paths. The feature list has the same members, and its order does not affect the result under this setting.
Use positional comparison when order or repeated values matter. The set option ignores repeated identical members and applies only when both lists contain primitive values. Arrays containing objects or other arrays remain positional.
RFC 8259, The JSON Data Interchange FormatYAML 1.2.2, Core Schema
Read the path for a key that contains a slash
Filter the result to Changed. The path /a~1b/~0draft refers to a key named ~draft inside a key named a/b. The escaped path distinguishes the slash inside a key from the slash between two keys.
Download the JSON report. It retains the detected formats, array mode, counts and every reported path. A value's json field stores its literal representation as text. This keeps exact digits even when the program reading the report uses a limited numeric type.
RFC 6901, JSON Pointer SyntaxRFC 8259, The JSON Data Interchange Format
Common questions
When should I choose JSON or YAML explicitly?
Choose the intended format when its strict syntax matters. Auto-detect tries JSON syntax first, then YAML, which can accept forms such as unquoted keys.
How are missing keys and null values compared?
A key with a stored null is present and its type is null. Adding that key to a document that lacked it creates an Added path.
Does changing object key order produce a difference?
Keys at the same path are matched by name. Reordering them leaves their values unchanged for this comparison.