For example if we need to send content which is in this format , how do we do it
{“name1”:[{“name11″:”value11”},{“name11″:”value12”},{“name11″:”value13″}],”name2”:value2}
I know how to set the basic kind
{“name1″:”value1″,”name2”:value2}
NameValuePair[] nameValuePairs = new NameValuePair[2];
nameValuePairs[0]= new BasicNameValuePair("name1", "value1");
nameValuePairs[1] = new BasicNameValuePair("name2", value2);
httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
How can we achieve nesting
Please see this question as it has a couple of answers that should help you. Here is a brief snippet from the answers code:
The other answer says you can do something like this: