Closed tripu closed 7 years ago
Notes to self:
Check:
$ find spec/ -iname '*.json' | xargs -n 1 jsonlint-php
Fix quotes (if there are no legit occurrences of '
):
$ sed -i.bak "s/'/\"/gi" spec/model/examples/FILE.json
Remove comments.
Normalise formatting:
const fs = require('fs');
fs.readFile('spec/model/examples/FILE.json', (foo, data) => {
fs.writeFile('spec/model/examples/FILE2.json', JSON.stringify(JSON.parse(data), null, 4) + '\n');
});
The 6 files under
/spec/model/examples/
are not valid JSON.While these are just examples, and not intended to be correct, breaking the JSON spec causes a few minor inconveniences:
This PR “fixes” one of these examples. Validity can be checked eg using an online JSON validator/editor. Most browsers may display the file very differently, and editors won't complain. See the file on the browser (if your browser has a JSON extension, it will let you collapse/expand entire sections, highlight syntax, render URIs as hyperlinks, etc).
NB: inline comments that were deleted here will have to be put somewhere else (eg, a new text file just for this?).
@espinr, if you're happy about this change, I'll do the same with the other 5 files.