JSON

JSON parsing and stringification

JSON解析与字符串化

 

JSON is a simple object that serves as the namespace for the global ECMAScript 5 functions
JSON.parse() and JSON.stringify().JSON is not a constructor.

JSON是一个简单对象,用作全局函数JSON.parse() 和 JSON.stringify()的命名空间。JSON不是构造函数。

 

“JSON” stands for JavaScript Object Notation. JSON is a data serialization format based on
JavaScript literals, and can represent the null value, the boolean values true and false, floating-
point numbers (using JavaScript numeric literals), strings (using JavaScript string literals),
arrays of values (using JavaScript array literal syntax) and string to value mappings (using
JavaScript object literal syntax).

JSON表示javascript object notation. JSON是基于js直接量的数据序列化格式。可以表示null值,boolean值,浮点数值,字符串,值得数组,字符串到值得映射。

 

 

 

JSON.parse()

parse a JSON-formatted string

解析JSON格式的字符串

 

var data = JSON.parse(text);

 

 

 

 

JSON.stringify()

serialize an object, array or primitive value

序列化对象,数组,原始值

 

转载于:https://www.cnblogs.com/sunhe/p/4347253.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值