【发布时间】:2018-01-10 02:31:23
【问题描述】:
我正在尝试将 arraylist 传递给 php 以执行一些操作。当我用邮递员进行测试时,我得到了以下响应..
{"correct_answers":"2","total_question":"5","message":"太棒了!您需要至少获得 60% 的分数才能进入下一个级别.."," message_percentage":"40","saved_message":"success"}
但是当我尝试发送请求时,我收到了这个错误..
java.lang.IllegalStateException:应为 BEGIN_OBJECT,但在第 1 行第 1 列路径 $
这是我的api接口
@POST("questions.php")
@FormUrlEncoded
Call<QuestionResult> correctQuestionData(@Field("tag") String tag, @Field("str_question_answer[]") ArrayList<QuestionAnswers> str_question_answer,
@Field("student_id") String student_id, @Field("level") String level);
【问题讨论】:
-
请显示“QuestionResult”类。我认为你弄错了。
标签: php android json retrofit2