Closed mozey closed 2 years ago
Also consider this https://stackoverflow.com/a/3104376/639133
Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser. - Douglas Crockford, 2012
Practically speaking, maybe json5 would be useful, as opposed to e.g. config.dev.js
? So the precedence would be
config.dev.yaml
config.dev.json5
config.dev.json
getConfigFilePaths
method defines the load precedence
"The YAML 1.2 specification was published in 2009. Its primary focus was making YAML a strict superset of JSON." See 1.2.2 spec
YAML files take precedence, e.g.config.dev.yaml
config.dev.json
This feature would be useful for adding comments to config files. Config files must still be flat key value pairs