json字符串数据原先是使用text进行存储的,字典格式会保持原有的顺序。
但是该为json后,变失去了顺序性。
如何在json格式里保持?
欢迎选择我的课程,让我们一起见证您的进步~~
json is naturally unordered, just like js. For reference If you want to maintain the order when outputting, add a key-value pair to json"sort":"a,b,c", and loop according to the order of the sort value when outputting
"sort":"a,b,c"
json is naturally unordered, just like js. For reference
If you want to maintain the order when outputting, add a key-value pair to json
"sort":"a,b,c"
, and loop according to the order of the sort value when outputting