JavaScript 中 JSON.parse 函数 和 JSON.stringify 函数

作者:袖梨 2022-06-25

1. JSON.parse 函数: 使用 JSON.parse 可将 JSON 字符串转换成对象。



 
 
 Document
 
 
 

运行结果:

2. JSON.stringify 函数:  可将 JavaScript 对象转换为Json表示字符串。



 
 
 Document
 
 
 

运行结果

相关文章

精彩推荐