数组 – 是否保持JSON列表中元素的顺序?

https://codeday.me/bug/20170521/16608.html


是的,JSON数组中的元素的顺序被保留。从RFC 7159 -The JavaScript Object Notation (JSON) Data Interchange Format

(强调我):

An object is an unordered collection of zero or more name/value

pairs, where a name is a string and a value is a string, number,

boolean, null, object, or array.

An array is an ordered sequence of zero or more values.

The terms “object” and “array” come from the conventions of

JavaScript.

你可能感兴趣的:(数组 – 是否保持JSON列表中元素的顺序?)