当前位置:网站首页>JSON数据文本
JSON数据文本
2022-04-22 07:41:00 【REMLILI】
一、基础
(一)本质:文本
1、概念
Javascript语法
数据对象
轻量级文本数据交换格式
独立
2、特征
纯文本
可读
值中值(层级)
JS解析
数据AJAX传输
无结束标签
短
快
内建方法解析
数组
不用保留字
(二)语法:JavaScript 对象
数据在名称/值对中
数据由逗号,分隔
大括号 {} 保存对象
中括号 [] 保存数组,数组可以包含多个对象
(三)名称/值对:(key : value)
"name" : "中国人民"
1、value:值
数字(整数或浮点数):{ "age":30 }
字符串(在双引号中)
逻辑值(true 或 false):布尔值
{ "flag":true }
数组(在中括号中):[]
{ "sites": [
{ "name":"菜鸟教程" , "url":"www.runoob.com" },
{ "name":"google" , "url":"www.google.com" },
{ "name":"微博" , "url":"www.weibo.com" }
]
}
对象(在大括号中):{ "name":"菜鸟教程" , "url":"www.runoob.com" }
null:{ "runoob":null }
(四)格式:
文件类型—— .json
MIME 类型是——application/json
(五)比较:
{
"sites": [
{ "name":"菜鸟教程" , "url":"www.runoob.com" },
{ "name":"google" , "url":"www.google.com" },
{ "name":"微博" , "url":"www.weibo.com" }
]
}
<sites>
<site>
<name>菜鸟教程</name> <url>www.runoob.com</url>
</site>
<site>
<name>google</name> <url>www.google.com</url>
</site>
<site>
<name>微博</name> <url>www.weibo.com</url>
</site>
</sites>
版权声明
本文为[REMLILI]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_25482375/article/details/124222023
边栏推荐
- SQL requirements processing - count the number of Mondays to Sundays in a given year
- Unity 透视投影矩阵变换的可视化
- 【无极低码】低代码平台开发日记,低代码平台之sql编程
- Cloud computing learning 2 - keystone component operation and maintenance and testing
- 变种快排:寻找最大的前K个数
- Experiment 1: introduction to data science -- data science cognition
- One question per day: improve the mold assembly on the 15th day of sprint in the big factory
- 如何用c语言实现【猜数字游戏】
- Variante rapide: trouver le nombre maximum de K premiers
- LabVIEW 2012中的收藏选板导入到LabVIEW 2013
猜你喜欢

16 way E1 optical transceiver + 4-way 100M Ethernet optical transceiver PDH optical transceiver 2m integrated service optical transceiver

云计算学习1——OpenStack云计算安装部署步骤图文并茂(先电2.2)

Fluorescently labeled hyaluronic acid

vscode的插件

Integrated service PDH optical transceiver 4-way Gigabit isolated Ethernet + 4-way E1 private network service 2m integrated service optical transceiver

The starting point of the final end of the 15th day of the sprint to the big factory

天翼云等服务器配置Apache Web服务

oh-my-notepro

Make the airtest ide into a script and make the script run

国内云安全市场突破百亿元,未来发展趋势如何?
随机推荐
7-34 删除重复字符(set用法)&&7-35 统计字符出现次数(unordered_map)
Pyqt5 uses the built-in database sqllite
pyqt5使用内置数据库sqllite
Nacos Foundation (3): open API configuration management test and close Nacos service
Make the airtest ide into a script and make the script run
雙光口1+1備份8路E1+2路千兆隔離網絡4路百兆隔離PDH光端機
牛客白月赛6【题解】
3-1 比较大小
用OnLayoutChangeListener的方法解决getTop=0的问题
【论文阅读】【3d目标检测】pvgnet
CAS: 36530-06-0 boron chloride phthalocyanine | phthalocyanine | boron chloride phthalocyanine | dichloroboron phthalocyanine dye | boron chloride phthalocyanine | boronsubphalocyaninichloride
Informatics Aosai yibentong 1317: [example 5.2] combined output
Experiment 2: mathematical basis in Data Science
js学习笔记
机器学习笔记 - 行列式
Is NFT just a beautiful foam?
SQL requirements processing - count the number of Mondays to Sundays in a given year
手把手教你实现RecyclerView的下拉刷新和上拉加载更多
Airtest installation and introduction
winform中网络开发