Page MenuHomePhabricator

Consider supporting JSON5 and YAML configuration files
Closed, DeclinedPublic

Description

JSON may be a difficult file format to edit manually. This is of particular relevance until we have the Web2Cit-Editor implemented.

To facilitate manually editing these files, consider adding support for JSON5 and YAML.

Event Timeline

Note that this may also be helpful once the Web2Cit-Editor is available, as it may facilitate seeing what changes are being saved to Meta.

Several days back in the Libera.chat IRC channel I suggested:

"MediaWiki Feature Request: Allow extension.json to contain single/multi-line comments! For example see https://packagist.org/packages/adhocore/json-comment

Just now I noticed https://json5.org/ as mentioned in https://github.com/nodejs/node/issues/40714

Also I see this from 6 years ago: https://phabricator.wikimedia.org/T127682

Thank you for you comment, @Jasonkhanlar. Just in case, note this task is about JSON5 support in the Web2Cit tool only.

Now that we have the JSON editor in Web2Cit, and that we may have the real-time editor in the future, I think it is less relevant to support this. Even if it may (i) help users understand what changes are being saved to metawiki, (ii) support users who would like to edit the files directly, and (iii) allow these users to include comments (not supported in JSON files).

Marking this as declined for now. Consider reopening in the future if ever needed.