Looks like you are trying to parse HTML as JSON (based on the
<br tag in your error).
<br of type java.lang.String cannot be converted to JSONArray
Double check the output you are trying to parse to make sure you are getting JSON back from your end point. Might be a accepts header or something like that.