Why not eval() JSON?

前端 未结 6 790
再見小時候
再見小時候 2020-12-10 06:14

As far as I know it is considered bad practice to eval() JSON objects in JavaScript, because of security. I can understand this concern if the JSON comes from a

6条回答
  •  抹茶落季
    2020-12-10 06:41

    check out this:http://blog.mozilla.com/webdev/2009/02/12/native-json-in-firefox-31/

    so at least for firefox you can use the built in json parser

提交回复
热议问题