Programming Tips - Alternatives to JSON for config files

Date: 2020mar22 Q. Alternatives to JSON for config files A. JSON is really unfriendly for human editing. Its fine for program-to-program communication. But has some issues when humans might be involved: - Overly verbose (eg you need to quote variable names - "name":"Dave") - Only doublequotes, no single quotes (which makes quoting text with double quotes messy) - No comments - Trailing commas are strictly forbidden If you are making a file that will be seen or editing by humans consider something better. Relaxed JSON (RJSON) TOML JSON5 JSONNET YAML (Not so great because whitespace is significant) Markdown (But most for documents) javaScript (BAD) javaScript supports comments and is more lenient than JSON. But can only be imported with eval() which is dangerous.