Is there any way to comment in or better organize a bower.json file? Is there any way to comment in or better organize a bower.json file? json json

Is there any way to comment in or better organize a bower.json file?


You cannot put comments in a JSON file. JSON is for data and nothing else.

If you would like to document your dependencies, consider adding a section to your README file that contains all of the information relevant to dependencies.


The classic approach to commenting JSON files is to add fake entries, which hopefully will be ignored by the consumer, such as:

"video-wavesurfer-comment":   "videojs plug-in for adding navigable waveforms; used by the video component"

For longer comments, use arrays:

"video-wavesurfer-comment": [  "videojs plug-in for adding navigable waveforms; used by the video component",  "Remove this for the non-video version."]

Of course, you'll have to put these somewhere where someone won't try to parse them. For instance, they could not go WITHIN "dependencies":.