Skip to content
Discussion options

You must be logged in to vote

My bad, i used this function: json_obj_encode_buf instead of json_arr_encode_buf. The first is for encode objects, so generate this output:

{"simple _s":[{"number":5 ,"text":"aaaaaa" ,"no_used":0},{" number":8,"text" :"eeeee","no_use d":0},{"number": 7,"text":"iiiiii ","no_used":0}]}

But the second (json_arr_encode_buf) generates an array, so the encoded output is like this:

[{"number":5 ,"text":"aaaaaa" ,"no_used":0},{" number":8,"text" :"eeeee","no_use d":0},{"number": 7,"text":"iiiiii ","no_used":0}]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by c4explosive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant