js对象与字符串相互转换

1. 对象转为字符串

JSON.stringify(obj)


2. json字符串转为对象

JSON.parse(str)
posted @ 2019-06-11 17:03  武卡卡  阅读(19585)  评论(0编辑  收藏  举报