admin
2021-12-22 0a1336cd2b95126d66d6f3126cb48a446cdbfad1
app/src/com/hanju/video/app/ui/recommend/CategoryRecommendFragment.java
@@ -17,6 +17,7 @@
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.hanju.lib.library.RetainViewFragment;
import com.hanju.video.app.util.JsonUtil;
import com.hanju.video.app.util.http.BasicTextHttpResponseHandler;
import com.hanju.video.app.util.http.HttpApiUtil;
import com.hanju.video.app.R;
@@ -127,11 +128,8 @@
                                                 Header[] headers, JSONObject jsonObject)
                            throws Exception {
                        if (jsonObject.getBoolean("IsPost")) {
                            Gson gson = new GsonBuilder()
                                    .setPrettyPrinting()
                                    .setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)
                                    .create();
                            List<CategoryRecommendVideo> list = gson.fromJson(jsonObject
                            List<CategoryRecommendVideo> list =  JsonUtil.videoGson.fromJson(jsonObject
                                    .getJSONObject("Data").getJSONArray("data")
                                    .toString(), new TypeToken<List<CategoryRecommendVideo>>() {
                            }.getType());
@@ -167,10 +165,8 @@
                                                 Header[] headers, JSONObject jsonObject)
                            throws Exception {
                        if (jsonObject.getBoolean("IsPost")) {
                            Gson gson = new GsonBuilder().setFieldNamingPolicy(
                                    FieldNamingPolicy.UPPER_CAMEL_CASE)
                                    .create();
                            List<VideoInfo> videoInfos = gson.fromJson(
                            List<VideoInfo> videoInfos =  JsonUtil.videoGson.fromJson(
                                    jsonObject.getJSONObject("Data")
                                            .getJSONArray("data").toString(),
                                    new TypeToken<List<VideoInfo>>() {