Move to JSON as the metadata format for DiffX.
Review Request #11702 — Created July 5, 2021 and submitted
Initially, DiffX was envisioned as having a YAML-style metadata format.
This was an attempt to keep the appearance of metadata similar to that
of several diff variants, such as Git-style diffs. However, none of
these variants had any sort of grammar defined for their format. They
were just entirely ad-hoc.
We couldn't depend on YAML itself, due to numerous parser
inconsistencies. A home-grown grammar was defined, but this would be yet
another custom structured data format, and this seemed to be the wrong
place to introduce this.
Instead, we're now using JSON as the metadata format. This has a couple
JSON is widely available in nearly any language, and through command
line tools, making it very easy to support.
No part of JSON output should conflict with the syntax of DiffX,
unified diffs, or any known custom diff format.
This change updates the spec to make it clear that JSON is the official
format used for DiffX, and to update all the example diffs and metadata
to use it.
Built the docs. Checked all the example diffs and metadata examples to
ensure they had correct syntax and was rendering correctly.
Maybe put "json" first in the list? We should probably also highly recommend that this option is included, even though ...
F401 'pygments.token.Punctuation' imported but unused
F401 'pygments.token.Operator' imported but unused
F401 'pygments.token.String' imported but unused
Changes to the
- It's now a recommendation instead of a reserved option.
- Removed the list of possible options, in favor of a single valid option:
- Added information on the requirements of diff parsers and generators when it comes to this option, or the lack of the option in a
- Specified that new format options will only be introduced when bumping the spec version.
Revision 2 (+800 -614)
Checks run (2 succeeded)