| | |
| | | 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; |
| | |
| | | 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()); |
| | |
| | | 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>>() { |