当前位置:网站首页>JSON.
JSON.
2022-04-23 05:26:00 【Courtesy.】
- JSON.parse() Methods are used to analysis JSON character string , Construct... Described by a string JavaScript Value or object .
Comma ending is not allowed , Use semicolon
JSON.parse('{}'); // {}
JSON.parse('true'); // true
JSON.parse('"foo"'); // "foo"
JSON.parse('[1, 5, "false"]'); // [1, 5, "false"]
JSON.parse('null'); // null
- JSON.stringify()
Method will be a JavaScript Object or value Convert to JSON character string
JSON.stringify({
x: 5, y: 6 }); //'{"x":5,"y":6}'
JSON.stringify([new Number(3), new String('false'), new Boolean(false)];
//'[3,"false",false]'
JSON.stringify({
x: [10, undefined, function(){
}, Symbol('')] });
//'{"x":[10,null,null,null]}'
JSON.stringify(new Date(2006, 0, 2, 15, 4, 5));
//'"2006-01-02T07:04:05.000Z"'
版权声明
本文为[Courtesy.]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220544338885.html
边栏推荐
- Self incrementing sequence creation of MySQL
- 跨域CORS的情缘~
- JSP-----JSP简介
- 双击.jar包无法运行解决方法
- Redis in node -- ioredis
- Laravel implements the Holy Grail model with template inheritance
- Cloud computing and cloud native architecture design of openshift
- (11) Vscode code formatting configuration
- What are the reasons for the failure of digital transformation?
- Multiple mainstream SQL queries only take the latest one of the data
猜你喜欢

The 2021 IT industry project management survey report was released!

PIP free export with path (@ file: / / /) notes

JS Array常见方法

相机成像+单应性变换+相机标定+立体校正

Five key technologies to improve the devsecops framework

Uniapp wechat sharing

Branch and loop statements

Requirements for SQL server to retrieve SQL and user information

領域驅動模型DDD(三)——使用Saga管理事務

青岛敏捷之旅,来了!
随机推荐
Kanban Quick Start Guide
2021-09-27
开源规则引擎——ice:致力于解决灵活繁复的硬编码问题
(11) Vscode code formatting configuration
Pandas to_ SQL function pit avoidance guide "with correct code to run"
Click the Add button - a box appears (similar to adding learning experience - undergraduate - Graduate)
Solve the problem of JS calculation accuracy
相机成像+单应性变换+相机标定+立体校正
无线网怎么用手机验证码登录解决方案
Open source rule engine - Ice: dedicated to solving flexible and complex hard coding problems
Laravel implements the Holy Grail model with template inheritance
青岛敏捷之旅,来了!
Five key technologies to improve the devsecops framework
Devops life cycle, all you want to know is here!
SQL Server检索SQL和用户信息的需求
npm升级后问题,慌得一批
Semi synchronous replication of MariaDB
Publish your own wheel - pypi packaging upload practice
Branch and loop statements
The title bar will be pushed to coincide with the status bar