rogpeppe / rjson

"readable JSON" - JSON-compatible codec with a few tweaks to make it quicker to write and easier to read
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

More relaxed rules #1

Open PhiLhoSoft opened 8 years ago

PhiLhoSoft commented 8 years ago

You tell we don't need quotes around keys if they follow the regex [a-zA-Z][a-zA-Z0-9\-_]*. Without even waiting to support Unicode and other exotic chars, I suggest to add $ as it is already accepted in JS identifiers: [a-zA-Z$][a-zA-Z0-9_$-]*

Supporting comments would help too... :smile: Json is a painful format for configuration (and too used by Node.js tools) without these.

zhihuiFan commented 7 years ago

I run into this issue as well, hope we can support [a-zA-Z$][a-zA-Z0-9$-]* as well.