JSON 错误 “java.lang.IllegalStateException: expected BEGIN_OBJECT 但在第 1 行第 1 列路径 $” 处是 STRING
public interface UserService {
@POST(Constants.Api.URL_REGISTRATION)
@FormUrlEncoded
BaseWrapper registerUser(@Field("first_name") String firstname, @Field("last_name") String lastname, @Field("regNumber") String phone, @Field("regRole") int role);
public BaseWrapper registerUser(User user) {
return getUserService().registerUser(user.getFirstName(), user.getLastName(), user.getPhone(), user.getRole());
}
此创建异常
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
非常感谢您的帮助。