com.mashape.unirest.http.exceptions.UnirestException

java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]

Samebug tips1

The json is invalid or you try to map to a different model.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web11

  • java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
  • via GitHub by agautam-hs
    , 5 months ago
    java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
  • java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
  • Stack trace

    • com.mashape.unirest.http.exceptions.UnirestException: java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1] at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143) at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68) at ScrapUnirestSample.main(ScrapUnirestSample.java:7) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1] at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:106) at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:139) ... 7 more Caused by: java.lang.RuntimeException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1] at com.mashape.unirest.http.JsonNode.<init>(JsonNode.java:51) at com.mashape.unirest.http.HttpResponse.<init>(HttpResponse.java:95) ... 8 more Caused by: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json.JSONArray.<init>(JSONArray.java:106) at org.json.JSONArray.<init>(JSONArray.java:145) at com.mashape.unirest.http.JsonNode.<init>(JsonNode.java:48) ... 9 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    2 times, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    77 more bugmates