What happens if you tell GitHub it's JSON
{
"hello": "world" // I want my comments!
}
Just tell GitHub it's JavaScript
{
"hello": "world" // I want my comments!
}
What happens if you tell GitHub it's JSON
{
"hello": "world" // I want my comments!
}
Just tell GitHub it's JavaScript
{
"hello": "world" // I want my comments!
}
{ | |
"hello": "world" // I want my comments! | |
} |
you can also tell GitHub to use json5
syntax highlighting.
I think this will help - https://jsonviewer.io/
+1 Modern problems require modern solutions.
2019 update: use jsonc
rendering. i.e json with comments
To allow jsonc
rendering for JSON files in a GitHub Gist, give them the file extension .json5
.
awesome
test JSONC
{
"hello": "world" // I want my comments!
}
test JSON5
{
"hello": "world" // I want my comments!
}
{
"hello": 123
}
cool!
Would be great to have key-value syntax highlighting just for readability purposes.
@dantebarba one way to cheat it seems to be yaml
https://stackoverflow.com/a/58946269
{
"hello": "world" # I want my comments!
}
@CryDeTaan thanks!
Thanks! I just wrote about this here, and referenced you: Stack Overflow: Can comments be used in JSON?
Testing today:
```json
{
"hello": "world" // comment
}
```jsonc
{
"hello": "world" // comment
}
```json5
{
"hello": "world" // comment
}
👍 cool! did you request a feature from github to enable comments in json code in markdown rendering?