Я получаю jsonarray, я сделал запрос jsonarray через залп ниже, является адресом для проверки json. Проблема в том, что я не получаю ответа.org.json.JSONException android
String url="http://reesguru.com/DesktopModules/ReEsServer/API/PropertyWebService/GetDataForSearchBySaleProperty?location=&propertyFor=1&propertyType=0&bathroom=0&bedroom=0&minprice=0&maxprice=0&mincoverarea=0&maxcoverarea=0&minplotarea=0&maxplotarea=0&Possession=0&TransactionType=0&orderby=UsdMonthlyRent&orderto=Desc";
JsonArrayRequest request=new JsonArrayRequest(url,new Response.Listener<JSONArray>() {
@Override
public void onResponse(JSONArray response) {
// TODO Auto-generated method stub
try {
Log.e("response",String.valueOf(response));
for(int i=0;i<response.length();i++)
{
JSONObject obj = response.getJSONObject(i);
String title = obj.getString("Title");
Log.e("title", String.valueOf(title));
}
} catch (JSONException e) {
Log.e("e", e.getMessage());
}
}
},new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError e) {
// TODO Auto-generated method stub
Log.e("error",e.getMessage());
}
});
queue.add(request);
} Thanyou заранее.
Это мое exception.i я получаю половину ответа на исключение
org.json.JSONException: Value[{"ProjectID":12,"ProjectseId":"Pr5735385","AgentId":33,"UserId":10,"Title":"Sunshine","Description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi …","Url":"www.vapiview.com","ProjectFor":1,"ProjectType":4,"ViewType":"0","FloorNumber":null,"TotalFloor":null,"ProjectSubType":41,"KeyLandmark":"MadhuBan Dem","LandArea":null,"LandAreaUnit":null,"Possession":null,"TransactionType":null,"NoofBedrooms":null,"NoofBathrooms":null,"NoofKitchen":null,"NoofBalcony":null,"FaceView":null,"ProjectAge":1,"Location":"Vapi","City":"Vapi","Postcode":"WC1B 4BB","ProjectOwnership":null,"DistanceDetails":"RailwayStation:12.00","SalePrice":0.00,"Furnished":null,"HomeFeaturesList":"","SocietyFeaturesList":"","OtherFeaturesList":"","Latitude":20.000000000000000,"Longitude":20.000000000000000,"ZoomValue":3,"IsDeleted":false,"upsize_ts":"AAAAAAAA8ho=","currencyunit":"","UsdSalePrice":0.00,"BuiltArea":null,"BuiltAreaUnit":null,"Project_QRCode":null,"GeoLocation_QRCode":null,"KeyName":"Commercial","ProjectImage":"/DesktopModules/ReEsWeb/Images/Property-Images/crop_20140603154802.jpg"},{"ProjectID":13,"ProjectseId":"Pr5735385","AgentId":33,"UserId":10,"Title":"Sunshine","Description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi …","Url":"www.vapiview.com","ProjectFor":1,"ProjectType":3,"ViewType":"0","FloorNumber":null,"TotalFloor":null,"ProjectSubType":37,"KeyLandmark":"MadhuBan Dem","LandArea":null,"LandAreaUnit":null,"Possession":null,"TransactionType":null,"NoofBedrooms":null,"NoofBathrooms":null,"NoofKitchen":null,"NoofBalcony":null,"FaceView":null,"ProjectAge":1,"Location":"Vapi","City":"Vapi","Postcode":"WC1B 4BB","ProjectOwnership":null,"DistanceDetails":null,"SalePrice":0.00,"Furnished":null,"HomeFeaturesList":null,"SocietyFeaturesList":null,"OtherFeaturesList":null,"Latitude":21.190109900000000,"Longitude":72.813936900000040,"ZoomValue":8,"IsDeleted":false,"upsize_ts":"AAAAAAAA8hs=","currencyunit":"","UsdSalePrice":0.00,"BuiltArea":null,"BuiltAreaUnit":null,"Project_QRCode":"/DesktopModules/ReEsWeb/Images/QRCodeImages/ProjectQRCode/13ProjectQRCode.jpg","GeoLocation_QRCode":"/DesktopModules/ReEsWeb/Images/QRCode_GeoLocationImages/ProjectGeoLocationImages/13GeoLocationQRCode.jpg","KeyName":"Residential","ProjectImage":null},{"ProjectID":14,"ProjectseId":"Pr5735385","AgentId":33,"UserId":10,"Title":"Sunshine","Description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi …","Url":"www.vapiview.com","ProjectFor":1,"ProjectType":4,"ViewType":"0","FloorNumber":0,"TotalFloor":0,"ProjectSubType":41,"KeyLandmark":"MadhuBan Dem","LandArea":0.0,"LandAreaUnit":"0","Possession":"1","TransactionType":0,"NoofBedrooms":1,"NoofBathrooms":1,"NoofKitchen":1,"NoofBalcony":1,"FaceView":"0","ProjectAge":1,"Location":"Vapi","City":"Vapi","Postcode":"WC1B 4BB","ProjectOwnership":null,"DistanceDetails":"","SalePrice":0.00,"Furnished":"Fully","HomeFeaturesList":null,"SocietyFeaturesList":null,"OtherFeaturesList":null,"Latitude":0.000000000000000,"Longitude":0.000000000000000,"ZoomValue":0,"IsDeleted":false,"upsize_ts":"AAAAAAAA8hw=","currencyunit":"","UsdSalePrice":0.00,"BuiltArea":0.0,"BuiltAreaUnit":"","Project_QRCode":null,"GeoLocation_QRCode":null,"KeyName":"Commercial","ProjectImage":null},{"ProjectID":15,"ProjectseId":"Pr5735385","AgentId":33,"UserId":10,"Title":"TestProject","Description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi …","Url":"www.google.com","ProjectFor":1,"ProjectType":3,"ViewType"
at org.json.JSON.typeMismatch(JSON.java:111)
at org.json.JSONObject.<init>(JSONObject.java:158)
at org.json.JSONObject.<init>(JSONObject.java:171)
проверить вы JSon это reutrn лишнюю запятую ,, после проекта ID – Tufan
ПУБЛИКАЦИИ исключения – Kunu
@Tufan но http://jsonlint.com/ говорит его достоверный ответ JSON – Mithun