how to add comments in.json file

This question already has an answer here:

  • Can comments be used in JSON? 42 answers

  • NO, comments are not part of the JSON RFC 7159, however there are JSON parsers which support C++-Style comments

    {
      "img":{ "width": 320, "height": 240 } //Picture details
    }
    

    See JSON++

    So the answer depends on what you are going to do with your JSON. The JavaScript-JSON parser ( JSON.parse() ) doesn't support this.

    链接地址: http://www.djcxy.com/p/3388.html

    上一篇: 如何为npm install添加注释到package.json?

    下一篇: 如何在.json文件中添加注释