What's JSON

本文详细解释了JSON(JavaScript Object Notation)的概念,包括其易读易写、便于解析生成的特点,以及基于JavaScript子集构建的特性。JSON通过使用键值对和有序值列表的两种基本结构实现数据的交换。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

虽然json已成为一个大家熟知的词,但是可能很多人仍不清楚其真正的概念。

 

So,what's json?

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

JSON is built on two structures:

  • A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures.

 

由上文可见,JSON是javascript对象标记法,包括两种形式:键值对形式和数组形式。

参考文献:

http://www.json.org/
http://www.crockford.com/
 

转载于:https://www.cnblogs.com/argb/archive/2011/07/08/2100902.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值