how to create a Json array of strings in android

前端 未结 2 428
滥情空心
滥情空心 2021-01-23 04:59

I am trying to create an array like this [\"stringone\",\"stringtwo\"] and pass it to the webserver. When I tried doing making it with a string array like Str

2条回答
  •  孤独总比滥情好
    2021-01-23 05:36

    The easiest way is to create a JSONArray object and use the put method(s) to add any Strings you want. To output the result, just use the toString() method.

提交回复
热议问题