Convert String array to json in android -


i have problem. want pass string array javascript, impossible, want convert string array json , send java script. how can that?

just convert use jsonarray,

import java.util.arrays; import org.json.jsonarray; string[] inputs = new string[] {"foo", "bar"}; jsonarray jsonarray = new jsonarray(arrays.aslist(inputs)); 

Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -