I am fetching data from `JSON` to android.But, I am getting an empty `JSON` response. The `PHP` code which generates `JSON` data is as follows:

```php
$result = $conn->query("SELECT dbname FROM users ORDER BY dbname ASC");
//defined second array for dbnames' list
$dblist = array();
while($row = $result->fetch_assoc()){
    //array_push($response['dblist'],$row['dbname']);
    $dblist[] = array('name'=>$row['dbname']);
}
$response['dblist'] = $dblist;

```

This is the `JSON` response. 

```
{"dblist":[{"name":"a"},{"name":"arsod"}]}

```

The `Java` code to fetch data in `android` is as follows:

```java
JSONObject obj = new JSONObject(s);
JSONArray names = obj.getJSONArray("dblist");

for(int i=0; i < names.length(); i++) {
    JSONObject n = names.getJSONObject(i);
    String name = n.getString("name");
    Toast.makeText(MainActivity.this, name, Toast.LENGTH_SHORT).show();
    institutes.add(name);
}

```

where `institutes` is an `ArrayList` in which I want to add each fetched element. But while fetching the data, I get the error in logcat `org.json.JSONException: End of input at character 0 of`. What is going wrong?