c json comments - Can comments be used in JSON?

newtonsoft json comments / json / comments

Can I use comments inside a JSON file? If so, how?

Steve Chambers



Answer #1

Here is what I found in the Google Firebase documentation that allows you to put comments in JSON:

{
  "//": "Some browsers will use this to enable push notifications.",
  "//": "It is the same for all projects, this is not your project's sender ID",
  "gcm_sender_id": "1234567890"
}