I need my app to send an ArrayList<String[]>
to php, I have this to call the service:
ArrayList<String[]> Items = new ArrayList<String[]>();
(...)
JSONObject JSONSend= new JSONObject();
JSONSend.put("Items", Items );
HttpConnectionParams.setConnectionTimeout(client.getParams(), 10000);
HttpResponse response;
HttpPost post = new HttpPost(SERVICE);
post.setHeader("json", JSONSend.toString());
StringEntity se = new StringEntity(JSONSend.toString());
se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"application/json"));
post.setEntity(se);
response = client.execute(post);
and on the PHP service:
$data = file_get_contents('php://input');
$json = json_decode($data);
$Items = $json->{'Items'};
error_log($Items);
and the php is returning this:
[[Ljava.lang.String;@413e2fd0, [Ljava.lang.String;@413a2940, [Ljava.lang.String;@4139df18, [Ljava.lang.String;@4141b5b0, [Ljava.lang.String;@413931c8, [Ljava.lang.String;@41348b40, [Ljava.lang.String;@41393928]
The type of the $ServMade is string, so how can I take care of the data as an array on php? Am I missing something?