我想通過一個arraylist到PHP做一些操作。當我測試與郵遞員我得到以下resoponse ..
{「correct_answers」:「2」,「total_question」:「5」,「消息」:「太棒了!你需要得分至少60%標記的移動一個新的水平。「」 message_percentage「:」 40" ,‘saved_message’:‘成功’}
但是,當我嘗試發送請求我收到此錯誤。 。
java.lang.IllegalStateException:預期的BEGIN_OBJECT,但是在第1行第1列處有STRING $
這是我的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」 級。我認爲你犯了錯誤。 –