我正在尝试解析Android中的JSON,一个基本的登录和密码屏幕
我收到以下错误





com.android.volley.ParseError:org.json.JSONException:无法转换类型为java.lang.String的值html正文脚本
到JSONObject


这是PHP CODE


 < ?php
 header(“Content-type:application / json”);

 $ hostname =“sql313.freecluster.eu”;
 $ user =“fceu_18433487”;&# XA; $通= “密码”;
 $ DBNAME = “fceu_18433487_testdb”;

 $分贝= mysqli_connect($主机名,$用户,$通,$ DBNAME);
 if($ db-> connect_errno> 0){
 die('无法连接数据库['。$ db-> connect_error。']');
}
& #xA; $ username = $ _ POST [“Email”];
 $ password = $ _POST [“Password”];

 $ statement = mysqli_prepare($ db,“SELECT * FROM` login` WHERE`Email` =?AND`Password` =?“);
 mysqli_stmt_bind_param($ statement,”ss“,$ username,$ password);
 mysqli_stmt_execute($ statement);&#xA ;
 mysqli_stmt_store_result($ statement);
 mysqli_stmt_bind_result($ statement,$ username,$ password);

 $ response = array(); $ rearray = array();& #xA; $ response [“success”] = false;
 while(mysqli_stmt_fetch($ statement))
 {
 $ response [“success”] = tr ue;
 $ response [“username”] = $ username;
 $ response [“password”] = $ password;
 $ rearray [“username”] = $ username;&#xA ; $ rearray [“password”] = $ password;

}


 echo json_encode($ response);

?> ;



 以下是我在Android中执行Json解析的代码
&#xA;&#xA; < pre> JsonObjectRequest jsonRequest = new JsonObjectRequest(Request.Method.POST,login_URL,new Response.Listener&lt; JSONObject&gt;(){&#xA; @越权#XA; public void onResponse(JSONObject response){&#xA;试试{&#xA; JSONObject o = new JSONObject(String.valueOf(response));&#xA; String name12 = o.getString(“success”);&#xA; Toast.makeText(getApplicationContext(),name12,Toast.LENGTH_LONG).show();&#XA; } catch(JSONException e){&#xA; e.printStackTrace();&#XA; }&#XA; }&#XA; },new Response.ErrorListener(){&#xA; @越权#XA; public void onErrorResponse(VolleyError error){&#xA; Toast.makeText(getApplicationContext(),error.toString(),Toast.LENGTH_LONG).show();&#XA; Log.d( “拉拉”,error.toString());&#XA; }&#XA; }){&#XA; @越权#XA; protected Map&lt; String,String&gt; getParams()方法{&#XA;地图&LT;字符串,字符串&GT; params = new HashMap&lt; String,String&gt;();&#xA; params.put( “电子邮件”,e1.getText()的toString()。);&#XA; params.put( “密码”,e2.getText()的toString()。);&#XA;返回参数;&#xA; }&#XA;&#XA; } && xA;
&#xA;&#xA; 我尝试在Postman上运行此脚本,但无法进行任何预览&#xA;我在这里做错了什么?
&#XA;