Closed TeoTwawki closed 7 years ago
You're absolutely right.
Would you consider to modify JSON parsing and sending me a PR ? I don't have much time implementing this right now.
Unfortunately I don't have a solid solution that performs well to just toss into your project.
But what I could do is make the example file just a document quoting the json structure within, so people don't mistake it for a file they can just edit and use.
Work for you?
Well I find an inelegant way to do this using a "__comment" key which will not be parsed in the config. I'll implement this asap still looking for a better solution.
JSON.minify()
can do this but its slow. I'm not familar with other methods.
Your example file will lead inexperienced users to create broken configs and then be confused as to why it isn't working. Also you have an extra comma on line 14. If you want
`//comments
you will need something to strip those out before feeding it to the json decoder.