We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1. JSON.parse()【从一个字符串中解析出json对象】 JavaScript 对象表示法 将 (JSON) 字符串转换为对象。
例子:
//定义一个字符串
var data='{"name":"goatling"}'
//解析对象
JSON.parse(data)
结果是:
name:"goatling"
2. JSON.stringify()【从一个对象中解析出字符串】
var data={name:'goatling'}
JSON.stringify(data)
'{"name":"goatling"}'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1. JSON.parse()【从一个字符串中解析出json对象】
JavaScript 对象表示法 将 (JSON) 字符串转换为对象。
例子:
//定义一个字符串
var data='{"name":"goatling"}'
//解析对象
JSON.parse(data)
结果是:
name:"goatling"
2. JSON.stringify()【从一个对象中解析出字符串】
var data={name:'goatling'}
JSON.stringify(data)
结果是:
'{"name":"goatling"}'
The text was updated successfully, but these errors were encountered: