格式化JSON对象时,"{"和"["之间的区别 [英] Difference between '{' and '[' when formatting JSON object

查看:156
本文介绍了格式化JSON对象时,"{"和"["之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

格式化JSON对象时,"{"和"["之间是否有区别?

Is there any difference between '{' and '[' when formatting a JSON object?

推荐答案

是的,一个{...}用于定义单个对象,而另一个[...]用于定义对象,值或列表的序列. ..

Yep one {...} is used to define a single object, while the other [...] is used to define a sequence of either objects, values or lists ...

对象定义为{key:object or list or value , ...} list只是对象,列表或值的序列,[objects or list or values, ... ] ...

objects are defined as such {key:object or list or value , ...} list ares nothing more than a sequence of either objects or lists or values, [objects or list or values, ... ]...

[{'value':1}, {'values':[1,2,3,3, {'a':'a', 'b':'b'}]}, 2, 3, 4]

这篇关于格式化JSON对象时,"{"和"["之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆