I need to make an application that uses JSON array to send and receive data from the RPC server. It is an application that searches for air fares. The idea is that in the field, enter the starting point and destination and travel dates, etc. This information is required to send as JSON object/array to RPC server that returns JSON field again.
it's about Google's RPC server that requires HTTP POST request.

The link below is an example JSON fields that server back, but I do not know how to generate JSON array:


What I've done so far is:

public class Details extends Activity implements OnClickListener{
 JSONParser jsonParser = new JSONParser();

 //class in which generate JSON object, etc

  public class ReadJSON extends AsyncTask<String, String, String>{

		protected String doInBackground(String... arg0) {
			// TODO Auto-generated method stub
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("f", "startAirport"));
params.add(new BasicNameValuePair("t", destAirport));
params.add(new BasicNameValuePair("d", "2013-06-22"));
params.add(new BasicNameValuePair("r", "2013-06-26"));		

	//makeHttpRequest is a method inside JSONParser class	
	json = jsonParser.makeHttpRequest(URL, "GET", params);

			// check log cat fro response
            Log.d("Create response", json.toString());
			return null;
		protected void onPostExecute(String result) {
			// TODO Auto-generated method stub

JSONParser class do the staff: execute http POST request based on given JSON data, etc.
error I get is as follows:
"Error parsing data org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject"

My English is not very good, so I apologize to the possible grammatical errors in the text.