comments - JSON5 - JSON中可以使用注释吗?

Comments are not permitted in JSON / json

我可以在JSON文件中使用注释吗?如果可以,如何使用?

Steve Chambers



Answer #1

这是我在Google Firebase文档中找到的内容,可让您将注释放入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"
}