字符串转json str = '{a:2,b:3}'json1 = eval( '(' + str + ')' )console.log json1 console.log JSON.parse(str) from:http://snandy.iteye.com/blog/615216