Core JSON及JSON解析
2024-09-01 14:15:38
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
最新文章
- 【Origin】工仕途中
- 建立dblink
- 最新CSS3常用30种选择器总结(适合初学者)
- YII 小部件实现Area textArea
- 1105ecos笔记
- MVC 之下载 我的实践
- 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
- shiro源码篇 - shiro的filter,你值得拥有
- Servlet】(2)有关Servlet实现的几个类:GenericServlet、HttpServlet、ServletConfig、ServletContext
- db nosql redis / Redis Sentinel
- django-访问控制
- 非Spring环境下使用Mybatis操作数据库的流程
- 【JVM】linux上tomcat中部署的web服务,时好时坏,莫名其妙宕机,报错:There is insufficient memory for the Java Runtime Environment to continue.
- Easyui入门视频教程 第08集---登录实现 ajax button的使用
- bin/hdfs dfs命令存在WARN util.NativeCodeLoader问题消除方法
- 音视频学习系列第(五)篇---MediaRecorder的使用
- Read N Characters Given Read4 II - Call multiple times
- python函数:基础函数调用整理
- sqlite的时间筛选字段
- gulp记录