JSON (JavaScript Object Notation) 是一种基于文档的标准数据交换格式,它可以让应用程序通过网络交换数据。JSON独立于编程语言(Ruby, Java/EE, JavaScript, C#/.Net, PHP, etc.)和计算机平台。基于JSON的API和第三方工具使得对JSON的使用变得非常容易,当下流行的NoSQL数据库例如MongoDB和CouchBase都是基于JSON的。  JSON 由Douglas Crockford于2001创建, JSON的 IANA (Internet Assigned Numbers Authority) media type是 application/json, 文件扩展名.json。

  JSON

  JSON简单的数据格式,它有3种基本的数据结构:
  • 键值对
  • 对象{}
  • 数组[]

键值对:

{
  “firstName”: “zhipengs”
}

对象(键值对集合)address:

{
  “address” : {
    “line1” : “555 Main Street”,
    “city” : “GuangZhou”,
    “stateOrProvince” : “GuangDong”,
    “zipOrPostalCode” : “510000”,
    “country” : “PRC”
  }
}

数组people”:

{
  “people” : [
    { “firstName”: “zhipeng”, “lastName”: “s”, “age”: 35 },
    { “firstName”: “san”, “lastName”: “zhang”, “age”: 32 }
  ]
}

键值对(Key-Value)中值的类型:Object Array String Number Boolean null

JSON验证(JSON Validation):http://jsonlint.com/   http://www.kjson.com/jsonparser/  http://json.parser.online.fr/  http://jsonviewer.stack.hu/

基于Java的JSON API

Jackson

Google GSON

SOJO

最新文章

  1. 【Origin】工仕途中
  2. 建立dblink
  3. 最新CSS3常用30种选择器总结(适合初学者)
  4. YII 小部件实现Area textArea
  5. 1105ecos笔记
  6. MVC 之下载 我的实践
  7. The account that is running SQL Server Setup does not have one or all of the following rights: the right to back up files and directories, the right to manage auditing and the security log and the rig
  8. shiro源码篇 - shiro的filter,你值得拥有
  9. Servlet】(2)有关Servlet实现的几个类:GenericServlet、HttpServlet、ServletConfig、ServletContext
  10. db nosql redis / Redis Sentinel
  11. django-访问控制
  12. 非Spring环境下使用Mybatis操作数据库的流程
  13. 【JVM】linux上tomcat中部署的web服务,时好时坏,莫名其妙宕机,报错:There is insufficient memory for the Java Runtime Environment to continue.
  14. Easyui入门视频教程 第08集---登录实现 ajax button的使用
  15. bin/hdfs dfs命令存在WARN util.NativeCodeLoader问题消除方法
  16. 音视频学习系列第(五)篇---MediaRecorder的使用
  17. Read N Characters Given Read4 II - Call multiple times
  18. python函数:基础函数调用整理
  19. sqlite的时间筛选字段
  20. gulp记录

热门文章

  1. 14 | count(*)这么慢,我该怎么办?
  2. AcWing P378 骑士放置 题解
  3. java上传文件夹文件
  4. [转]C++ 类中的static成员的初始化和特点
  5. 03_Elastic部署
  6. OpenCV:Python下OpenCV安装和入门最强详细攻略
  7. BP神经网络原理及在Matlab中的应用
  8. yarn 强制孙依赖的版本
  9. mysql 修改表结构以支持事务操作
  10. Spring Cloud Gateway(七):路由谓词工厂WeightRoutePredicateFactory