Currently I am only able to actually read the php file that contains a json format.
What I want to do is read an echo statement (in json format) in replace of reading the actual file.
This is my android code so far to request a php file that contains a json format for me to read:
// defaultHttpClient
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(url);
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent(); // This is storing the contents from the php file
Thanks in advance
This is the php file:
{
"user": [
{
"id": "001",
"name": "Raj Amal",
"email": "raj.amalw@gmail.com"
}
]
}
I want to do this:
<?php
echo '{
"user": [
{
"id": "001",
"name": "Raj Amal",
"email": "raj.amalw@gmail.com"
}
]
}';
?>