mirror of
https://github.com/json-c/json-c.git
synced 2026-03-26 16:39:06 +08:00
Add new json_object_array_sort function
- uses libc's qsort to sort the arraylist - add test in test1.c
This commit is contained in:
@@ -13,6 +13,20 @@ my_array=
|
||||
[3]=null
|
||||
[4]=5
|
||||
my_array.to_string()=[ 1, 2, 3, null, 5 ]
|
||||
my_array=
|
||||
[0]=3
|
||||
[1]=1
|
||||
[2]=2
|
||||
[3]=null
|
||||
[4]=0
|
||||
my_array.to_string()=[ 3, 1, 2, null, 0 ]
|
||||
my_array=
|
||||
[0]=null
|
||||
[1]=0
|
||||
[2]=1
|
||||
[3]=2
|
||||
[4]=3
|
||||
my_array.to_string()=[ null, 0, 1, 2, 3 ]
|
||||
my_object=
|
||||
abc: 12
|
||||
foo: "bar"
|
||||
|
||||
Reference in New Issue
Block a user