Using a json
codeblock expects strictly valid JSON:
{
"Email": { // <-- settings grouped under "Email"
"ClientKey": "xxx",
"ClientSecret": "xxx"
}
}
I tried jsonc
and json5
, both don't seem to be supported. Anyway to get dev.to to play nice with commented json without marking it as javascript
?
Top comments (3)
It's not a spiffy solution, but you might just have to add keys to your object just for the purpose of commenting and prefix the values with double slashes. My only other thought is to use multiple code blocks, alternating between json and js as needed.
javascript
?You can comment in json like this: