ローカルアドレスphpからJSON配列を読みたい場合は例外があります。 PHPの 文字列は次のようになります。org.json.JSONException:JSONArrayテキストは '[' at 1 [character 2 line 1]で始まる必要があります
[{"firstname":"ime1","lastname":"prezime1"},{"firstname":"ime2","lastname":"prezime2"},{"firstname":"ime3","lastname":"prezime3"}]
と読み込みのための私のコードは次のようになります。
JSONArray jsonArray = new JSONArray("http://192.168.1.23/get_people.php");
Exceptoinは次のとおりです。
org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
*実際に* http://192.168.1.23/get_people.phpを呼び出した場合の出力は? – luk2302
ここはChromeにあります:http://prntscr.com/dyf4pt –