Advertisement
Guest User

Untitled

a guest
May 26th, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. {
  2. "msg_code": 200,
  3. "msg_type": "success",
  4. "msg_text": "success",
  5. "msg_data": [
  6. {
  7. "pid": "1234567",
  8. "time": "1459029423",
  9. "parent_pid": "0",
  10. },
  11. false,
  12. {
  13. "pid": "987654",
  14. "time": "1458997403",
  15. "parent_pid": "0",
  16. }
  17. ]
  18. }
  19.  
  20. com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 9988 path $.msg_data[12]
  21.  
  22. HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
  23. logging.setLevel(logLevel);
  24.  
  25. OkHttpClient okHttpClient = new OkHttpClient.Builder()
  26. .addInterceptor(logging)
  27. .connectTimeout(60, TimeUnit.SECONDS)
  28. .writeTimeout(60, TimeUnit.SECONDS)
  29. .readTimeout(60, TimeUnit.SECONDS)
  30. .build();
  31.  
  32. gooderApi = new Retrofit.Builder()
  33. .baseUrl(BASE_API_URL)
  34. .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
  35. .addConverterFactory(GsonConverterFactory.create())
  36. .client(okHttpClient)
  37. .build()
  38. .create(ApiInterface.class);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement