json属性名必须加引号的讨论

 优质参考资料:

         1.https://blog.csdn.net/Goskalrie/article/details/52151175    

         2.https://blog.csdn.net/weixin_42787326/article/details/82725078   

         3.https://www.cnblogs.com/mflr/p/7774279.html   JSON对象与js对象的区别

 

但是当使用非合法命名规则的时候,就必须要使用引号,

 还需要注意的是,如果加上引号,使用  “.属性名”: 方式读取属性时仍然会出错,需要使用  “[‘属性名']”: 方式读取属性  详细参考资料 2



原文地址:https://www.cnblogs.com/wang-min/p/10437779.html