com.squareup.moshi.JsonDataException

Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

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

Solutions on the web10

  • via Stack Overflow by Matsurf
    , 1 month ago
    Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $
  • via GitHub by thanh-taro
    , 11 months ago
    Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $
  • Expected BEGIN_ARRAY but was STRING at path $.Keys.jesse
  • Stack trace

    • com.squareup.moshi.JsonDataException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $ at com.squareup.moshi.JsonReader.beginArray(JsonReader.java:346) at com.squareup.moshi.ArrayJsonAdapter.fromJson(ArrayJsonAdapter.java:53) at com.squareup.moshi.JsonAdapter$1.fromJson(JsonAdapter.java:68) at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:33) at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:37) at com.e4bros.thodia.signin.SignInPresenter$6.onResponse(SignInPresenter.java:255) at com.e4bros.thodia.signin.SignInPresenter$6.onResponse(SignInPresenter.java:213) at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:67) at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:30) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

    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

    You’re the first here who have seen this exception.