4 ms·
Nah YAML is better because of diffing. JSON uses commas `,` which will show multiple changes when the last item of a list changes.
by cphoover 8y ago
Nah YAML is better because of diffing.
JSON uses commas `,` which will show multiple changes when the last item of a list changes.
- int_19h 8y agoSide note: it's really sad that more languages aren't allowing trailing commas in sequence literals and other places, like Python does. In Python, these are legal: [1, 2, 3,] foo(1, 2, 3,) And thus, when writing multiline literals and calls, it's pretty common to use the comma as a line terminator, precisely so that new lines can be added at the end without touching the previous line.
- ergothus 8y agoJavascript DOES allow trailing commas, though it never caught on since IE6 would blow up on them. JSON, however, does not.