How to Write Comments in Json




I spend a lot of time working in either JSON or YAML while building out infrastructure in AWS. I prefer YAML as I find it less cumbersome to type and it allows for comments.

Today on Mastodon I saw this posting that illustrates a way to put comments into JSON.

{
    "//": [
      "I am a comment",
    ],
    ...
}

Cumbersome, but effective.