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:
Frederik Deweerdt
2011-10-07 21:07:18 +02:00
parent a8ffbe97b0
commit c43871c866
6 changed files with 83 additions and 0 deletions

View File

@@ -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"