zoukankan
html css js c++ java
JSON优缺点
总结:
1.占带宽小(格式是压缩的)
2.
js
通过eval()进行Json读取(便于客户端读取)
3. JSON支持多种语言(c、c++、
PHP
等),便于服务端解析
JSON (
JavaScript
Object Notation) 的轻量级数据交换格式能够替代XML的工作.
优点:
1. 数据格式比较简单, 易于读写, 格式都是压缩的, 占用带宽小
2. 易于解析这种语言, 客户端
javascript
可以简单的通过eval()进行JSON数据的读取
3. 支持多种语言, 包括ActionScript, C, C#, ColdFusion,
Java
, JavaScript, Perl,
php
,
Python
, Ruby等语言服务器端语言, 便于服务器端的解析
4. 在PHP世界, 已经有PHP-JSON和JSON-PHP出现了, 便于PHP
序列化
后的程序直接调用. PHP服务器端的对象、数组等能够直接生JSON格式, 便于客户端的访问提取. 另外PHP的PEAR类已经提出了支持 (
http://pear.php.net/pepr/pepr-proposal-show.php?id=198
)
5. 因为JSON格式能够直接为服务器端代码使用, 大大简化了服务器端和客户端的代码开发量, 但是完成的任务不变, 且易于维护
缺点:
1. 没有XML格式这么推广的深入人心和使用广泛, 没有XML那么通用性2. JSON格式目前在
Web Service
中推广还属于初级阶段PS: 据说Google的Ajax是使用 JSON+模板 做的
查看全文
相关阅读:
洛谷P2437 蜜蜂路线
树莓派python3安装face_recognition和opencv2
记事本
python中退出多层循环的方法
openwrt 不死uboot Breed大全
python通过http下载文件的方法
Python37 GUI Qt5安装与使用
openwrt Python3.6通过自带的urllib通过get或post方法请求url
openwrt 版本源码地址
echo追加和覆盖
原文地址:https://www.cnblogs.com/liuna/p/7234537.html
最新文章
calcite建表语句解析时,需要进行的字符匹配序列
doris on es客户端查询报one instance report fail throw updateStatus()
Doris0.11.38拓展FE为高可用时不能启动
ES7.6.1 配置x-path后 连接java客户端
Doris搭建中的问题
oracle18c字符集列表
ambari默认安装配置信息
mysql核心配置文件mysqld主要内容
正则表达式,匹配花括号{}
hadoop的namenode重复格式化后,datanode无法启动的解决办法
热门文章
js中的事件对象
表单相关API
js中BOM(浏览器对象模型)
js中DOM简单语法
ST算法
Floyd多源最短路算法
洛谷P1064 金明的预算方案
矩阵快速幂(斐波那契数列) 洛谷1962
洛谷 P1021邮票面值设计
洛谷 P6599 「EZEC-2」异或
Copyright © 2011-2022 走看看