Open electerious opened 8 years ago
The problem is caused by the auto detection of ini. The parser parses anything that starts with {
as JSON and anything else as ini. My PR (#85) will actually fix that.
it doesn't make sense to use a array inside an rc config file. this should be treated as an error.
Even if you think of that as an error, parsing it as ini is definitely the wrong response. Maybe you could just error if the first char is [ and it is on its own line?
My
.rc
file contains a valid JSON starting with a square bracket:And rc outputs the following:
I tested the
strip-json-comments
module and it's not causing this problem. I guess it's because rc tries to merge the JSON with the defaults.