Ошибка значения <br типа java.lang.String не может быть преобразована в JSONObject

у меня возникли проблемы со строкой не может преобразовать в JSONObject. Кто-нибудь может помочь решить эту проблему? Спасибо и очень признателен за помощь.

 0) {  
        $response["reserve"] = array();
        while ($row = mysql_fetch_array($result)) {

            // temp user array

            $reserv = array();

            $reserv["fullname"] = $row["fullname"];
            $reserv["contact"] = $row["contact"];
            $reserv["reserveDate"] = $row["reserveDate"];
            $reserv["reserveTime"] = $row["reserveTime"];
            $reserv["pax"] = $row["pax"];
            $reserv["tableNumber"] = $row["tableNumber"];
            // push single product into final response array

            array_push($response["reserv"], $reserv);

        }

        // success
        $response["success"] = 1;
        // echoing JSON response
        echo json_encode($response);
    } else {
        $response["success"] = 0;
        $response["message"] = "No user found";
        // echo no users JSON
        echo json_encode($response);
    }
    ?>

Класс JSONPARSER}

package com.example.easy;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;

public class JSONParser {

static InputStream is = null;
static JSONObject jObj = null;
static String json = "";

// constructor
public JSONParser() {

}

// function get json from url
// by making HTTP POST or GET method
public JSONObject makeHttpRequest(String url, String method,
        List params) {

    // Making HTTP request
    try {

        // check for request method
        if(method == "POST"){
            // request method is POST
            // defaultHttpClient
            DefaultHttpClient httpClient = new DefaultHttpClient();
            HttpPost httpPost = new HttpPost(url);
            httpPost.setEntity(new UrlEncodedFormEntity(params));

            HttpResponse httpResponse = httpClient.execute(httpPost);
            HttpEntity httpEntity = httpResponse.getEntity();
            is = httpEntity.getContent();

        }else if(method == "GET"){
            // request method is GET
            DefaultHttpClient httpClient = new DefaultHttpClient();
            String paramString = URLEncodedUtils.format(params, "utf-8");
            url += "?" + paramString;
            HttpGet httpGet = new HttpGet(url);

            HttpResponse httpResponse = httpClient.execute(httpGet);
            HttpEntity httpEntity = httpResponse.getEntity();
            is = httpEntity.getContent();
        }           


    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    } catch (ClientProtocolException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

    try {
        BufferedReader reader = new BufferedReader(new InputStreamReader(
                is, "iso-8859-1"), 8);
        StringBuilder sb = new StringBuilder();
        String line = null;
        while ((line = reader.readLine()) != null) {
            sb.append(line + "\n");
        }

        //json = sb.toString();
        json = sb.toString().substring(0, sb.toString().length()-1);
        System.out.println("jsonstring ="+json);
        is.close();
    } catch (Exception e) {
        Log.e("Buffer Error", "Error converting result " + e.toString());
    }

    // try parse the string to a JSON object
    try {
        jObj = new JSONObject(json);
    } catch (JSONException e) {
        Log.e("JSON Parser", "Error parsing data " + e.toString());
    }

    // return JSON String
    return jObj;

}

В классе ReserveInfo произошла ошибка. Получите эту ошибку " значение .

package com.example.easy;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;

public class Custname extends Activity implements OnClickListener {
    TextView custinfo2,lblempty2;


        Button btnsearch1;
        TextView custinfo,lblempty;
        ScrollView svcustdetails, svreserve;

        AutoCompleteTextView txtcustname ;
        String Contacts[];
        int arraysize;  
        private ProgressDialog pDialog;

        JSONParser jParser = new JSONParser();
        JSONParser jParser2 = new JSONParser();
        private static final String TAG_SUCCESS = "success";
        private static final String TAG_RESERV = "reserv";
        private static final String TAG_FULLNAME = "fullname";
        private static final String TAG_CONTACT = "contact";
        private static final String TAG_DATE = "reserveDate";
        private static final String TAG_TIME = "reserveTime";
        private static final String TAG_PAX = "pax";
        private static final String TAG_TABLE = "tableNumber";
        JSONArray reserv = null;
        JSONArray reserv2 = null;
        JSONObject json2;
        String contactno;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.custname);

        btnsearch1= (Button) findViewById(R.id.btnsearch);

        svcustdetails=(ScrollView)findViewById(R.id.svcustdetails);
        svreserve=(ScrollView)findViewById(R.id.svreserve);
        custinfo2=(TextView)findViewById(R.id.custinfo2);

        txtcustname = (AutoCompleteTextView)findViewById(R.id.txtcustname);     

         txtcustname = (AutoCompleteTextView)findViewById(R.id.txtcustname);

            btnsearch1= (Button) findViewById(R.id.btnsearch1);
            lblempty2= (TextView)findViewById(R.id.lblempty2);

        new LoadContact().execute();

        btnsearch1.setOnClickListener(new OnClickListener() {
            public void onClick(final View v) {
                if(txtcustname.getText().toString().equalsIgnoreCase("")){
                    Toast.makeText(Custname.this,"Please enter customer name", Toast.LENGTH_SHORT).show();
                }else{
                    reset();
                    new ReserveInfo().execute();
                }   
            }
        });
    }

    class LoadContact extends AsyncTask {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
        }

        protected String doInBackground(String... args) {
            List params = new ArrayList();    
            JSONObject json = jParser.makeHttpRequest("http://10.0.2.2/Laicamproject/checkName.php", "GET", params);            
            // Check log cat for JSON reponse
            Log.d("All Name: ", json.toString());
            Contacts=new String[arraysize];

            try {
                int success = json.getInt(TAG_SUCCESS);
                if (success == 1) {
                    reserv = json.getJSONArray(TAG_RESERV);
                    arraysize=reserv.length();
                    Contacts=new String[arraysize];
                    for(int a=0;a

Ответы на вопрос(1)

Ваш ответ на вопрос