Last active
October 17, 2022 15:00
-
-
Save MoOx/5271067 to your computer and use it in GitHub Desktop.
How to make comment in JSON file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"//field": "These 'double quote' 'double quote' are used as comments, because JSON doesnt' allow comment", | |
"field": {}, | |
"#another-field": "Another comment", | |
"another-field": {}, | |
"/*stuff": "Be careful to use them when you have full control of the content :)", | |
"stuff": [], | |
"bla": "bla" | |
} |
I found it
Hjson, at https://hjson.github.io/, works better for me than JSON5. YMMV.
Its Python module has been maintained more recently and its documentation shows the syntax of multiline comments as well as #
-based comments.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try
JSON5
orJSONC
https://json5.org/
https://code.visualstudio.com/docs/languages/json#_json-with-comments