Hi i have multi dimensional array format data.I need to pass these datas with basicnamevaluepair to POST method.Is there any possible to pass the entire arraylist as value to single key in android.
ex:
the arrayList is
ArrayList<String> data=new ArrayList<String>();
data.add("Datas");
data.add("Datas2");
data.add("Datas3");
Is it possible to pass arraylist like this.Passing values in ArrayList using BasicNameValuePair.
List<BasicNameValuePair> pairedData=new ArrayList<BasicNameValuepair();
pairedDatas.add(new BasicNameValuePair("id","8"));
pairedDatas.add(new BasicNameValuePair("name","Customer Details"));
pairedDatas.add(new BasicNameValuePair("datas",data);
There is no possible to pass arraylist values in basicnamevalue pair.the only thing we can do this.Convert the product array as jsonArray and later convert it as string and pass it as string in basicnamevaluepair.At server side we need to parse string using jsondecode whose key having jsonarray as string .