org.json.JSON Ausnahme : End of input at character 0

Ich versuche zu Parsen von json in android, aber ich bekomme diese seltsame Ausnahme. Meine json-Daten

{"id":"1","Betreiber":"1","name":"gravitas","description":"ein fest","start_time":"0000-00-00 00:00:00","end_time":"0000-00-00 00:00:00","venue":"vellore","radius":"10","lat":"11","lng":"11","type":"type","ownername":"dilip","noofpolls":0,"noofquizes":0,"peopleattending":0,"result":true}

und android ich tun

JSONObject j =new JSONObject(response);
Event pst = gson.fromJson(j.toString(),  Event.class);

Bekomme ich:

org.json.JSONException: end of input at character 0 of

Was ist Los mit ihm? Hier ist der code...

RestClient client = new RestClient("http://192.168.1.3/services/events/"+eve.getName());         
        try {
             Log.i("MY INFO", "calling boston");
            client.Execute(RequestMethod.POST);
        } catch (Exception e) {
            e.printStackTrace();
        }

        String response = client.getResponse();
         Log.i("MY INFO", response);
         GsonBuilder gsonb = new GsonBuilder();
         Gson gson = gsonb.create();
         Event pst = null;

        try {
            JSONObject j =new JSONObject(response);
            pst = gson.fromJson(j.toString(),  Event.class);

        } catch (JSONException e) {
            //TODO Auto-generated catch block
            e.printStackTrace();
        }

InformationsquelleAutor Rakon_188 | 2011-11-20

Schreibe einen Kommentar