Is there any way to convert a normal Java array or ArrayList
to a Json Array in Android to pass the JSON object to a webservice?
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
If you want or need to work with a Java array then you can always use the Something along those lines should work.
Beware that code is written offhand so consider it pseudo-code. |
|||||
|
This is only an example using a string arraylist |
|||||||||||||
|
you need external library
Google Gson is the best library http://code.google.com/p/google-gson/ |
|||
|
I don't think that there is a direct way. Here I am sharing some links. I hope they help you http://localtone.blogspot.com/2009/07/post-json-using-android-and-httpclient.html |
||||
|