This hack, while nice, is still just a work around. I highly recommend that if you can, in as many places as possible use YAML instead of JSON.<p>JSON works great for on the fly communication with frontends that are running JavaScript, or for communication between JavaScript processes like Node.js servers. But for configuration files and other things that need comments YAML is many times better, both for it's clean, Markdown reminiscent structure, and its native comment support.<p>Node.js has a great module called js-yaml (<a href="https://github.com/nodeca/js-yaml" rel="nofollow">https://github.com/nodeca/js-yaml</a>) which automatically registers handlers for .yml and .yaml files, allowing you to require them in your Node.js code just like you can with JSON files.<p>It also comes with a YAML parser for the browser side of things, so if you want you could even communicate YAML directly from the server to the client side, although frankly I don't see much advantage to sending YAML over the wire instead of JSON. (And as others have mentioned below untrusted YAML sources could insert malicious objects in YAML, so I wouldn't recommend this technique.)<p>You can even use YAML for your package.json in a Node program: (<a href="https://npmjs.org/package/npm-yaml" rel="nofollow">https://npmjs.org/package/npm-yaml</a>)