目录
1、JSON转String
js
var user = {name: '张三', age: 18}
JSON.stringify(user) /// ---> '{"name":"张三","age":18}'
2、String转JSON
js
var user = '{"name":"张三","age":18}'
JSON.parse(user) // ---> {name: '张三', age: 18}