String strData="{"trailers":[{"id":64259,"movieName":"《西游伏妖篇》新预告","coverImg":"http://img5.mtime.cn/mg/2017/01/17/140838.90647853.jpg","movieId":208325,"url":"http://vfx.mtime.cn/Video/2017/01/16/mp4/170116173823484498_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2017/01/16/mp4/170116173823484498.mp4","videoTitle":"西游伏妖篇 剧场版预告片","videoLength":127,"rating":-1,"type":["动作","奇幻","喜剧","古装"],"summary":"唐僧\"重色轻友\"与悟空反目"},{"id":64245,"movieName":"《刺客信条》中文预告","coverImg":"http://img5.mtime.cn/mg/2017/01/16/102859.72523501.jpg","movieId":200591,"url":"http://vfx.mtime.cn/Video/2017/01/16/mp4/170116084052051939_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2017/01/16/mp4/170116084052051939.mp4","videoTitle":"刺客信条 中文版定档预告片","videoLength":146,"rating":7.2,"type":["动作","冒险","奇幻","科幻"],"summary":"“法鲨”变身中世界刺客"},{"id":64200,"movieName":"《赛车总动员3》中文预告","coverImg":"http://img5.mtime.cn/mg/2017/01/10/192325.32018741.jpg","movieId":228907,"url":"http://vfx.mtime.cn/Video/2017/01/10/mp4/170110151912397035_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2017/01/10/mp4/170110151912397035.mp4","videoTitle":"赛车总动员3:极速挑战 中文预告片","videoLength":94,"rating":-1,"type":["动画","冒险","喜剧","家庭","运动"],"summary":"麦昆走下神坛,如何重回巅峰"},{"id":64103,"movieName":"《悟空传》首款预告片","coverImg":"http://img5.mtime.cn/mg/2017/01/05/143020.23995254.jpg","movieId":226435,"url":"http://vfx.mtime.cn/Video/2017/01/05/mp4/170105093327060871_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2017/01/05/mp4/170105093327060871.mp4","videoTitle":"悟空传 预告片之我是悟空","videoLength":65,"rating":-1,"type":["奇幻","剧情","动作"],"summary":"最叛逆悟空横空出世"},{"id":64025,"movieName":"《世纪战元》俄版预告片","coverImg":"http://img5.mtime.cn/mg/2016/12/29/171514.54117187.jpg","movieId":233043,"url":"http://vfx.mtime.cn/Video/2016/12/29/mp4/161229134943070513_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/29/mp4/161229134943070513.mp4","videoTitle":"世纪战元 预告片2","videoLength":137,"rating":-1,"type":["动作","冒险","科幻"],"summary":"战斗民族版“复联”集结"},{"id":63966,"movieName":"《异形:契约》中文版预告","coverImg":"http://img5.mtime.cn/mg/2016/12/26/164311.99230575.jpg","movieId":200612,"url":"http://vfx.mtime.cn/Video/2016/12/25/mp4/161225131643821149_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/25/mp4/161225131643821149.mp4","videoTitle":"异形:契约 中文版先行预告片","videoLength":123,"rating":-1,"type":["动作","恐怖","科幻","惊悚"],"summary":"宇航员接连惨死血浆四溅"},{"id":63961,"movieName":"《时间之旅》日本版预告片","coverImg":"http://img5.mtime.cn/mg/2016/12/24/160124.19385932.jpg","movieId":156629,"url":"http://vfx.mtime.cn/Video/2016/12/24/mp4/161224105613183615_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/24/mp4/161224105613183615.mp4","videoTitle":"时间之旅 日本版预告片","videoLength":90,"rating":-1,"type":["纪录片","剧情"],"summary":"编织出壮丽时间篇章"},{"id":63996,"movieName":"《西游伏妖篇》动作版预告","coverImg":"http://img5.mtime.cn/mg/2016/12/28/162417.51435462.jpg","movieId":208325,"url":"http://vfx.mtime.cn/Video/2016/12/27/mp4/161227204134063682_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/27/mp4/161227204134063682.mp4","videoTitle":"西游伏妖篇 打斗版预告片","videoLength":123,"rating":-1,"type":["动作","奇幻","喜剧","古装"],"summary":"唐僧挥鞭打大圣 片尾有彩蛋"},{"id":63942,"movieName":"《迷失Z城》先行版预告片","coverImg":"http://img5.mtime.cn/mg/2016/12/23/151006.92013949.jpg","movieId":82423,"url":"http://vfx.mtime.cn/Video/2016/12/23/mp4/161223064201846931_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/23/mp4/161223064201846931.mp4","videoTitle":"迷失Z城 预告片2","videoLength":74,"rating":-1,"type":["动作","冒险","传记","剧情","历史"],"summary":"探险队遭遇土著追杀 生死不明前途未卜"},{"id":63866,"movieName":"《银翼杀手2049》中文预告","coverImg":"http://img5.mtime.cn/mg/2016/12/20/152243.84093718.jpg","movieId":212468,"url":"http://vfx.mtime.cn/Video/2016/12/20/mp4/161220085917652628_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/20/mp4/161220085917652628.mp4","videoTitle":"银翼杀手2049 中文版先行预告片","videoLength":99,"rating":-1,"type":["科幻"],"summary":"哈里森福特与瑞恩高斯林对峙"},{"id":63799,"movieName":"《敦刻尔克》剧场版预告","coverImg":"http://img5.mtime.cn/mg/2016/12/15/174641.37616965.jpg","movieId":230741,"url":"http://vfx.mtime.cn/Video/2016/12/14/mp4/161214234616222245_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/14/mp4/161214234616222245.mp4","videoTitle":"敦刻尔克 剧场版预告片","videoLength":129,"rating":-1,"type":["动作","剧情","历史","惊悚","战争"],"summary":"军民协作“大撤退”"},{"id":63757,"movieName":"《速度与激情8》中文预告","coverImg":"http://img5.mtime.cn/mg/2016/12/13/172251.71309218.jpg","movieId":224149,"url":"http://vfx.mtime.cn/Video/2016/12/12/mp4/161212190638286683_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/12/mp4/161212190638286683.mp4","videoTitle":"速度与激情8 中文版预告片","videoLength":195,"rating":-1,"type":["动作","犯罪","惊悚"],"summary":"范迪塞尔与亲友反戈相向"},{"id":63651,"movieName":"《变形金刚5》中文预告","coverImg":"http://img5.mtime.cn/mg/2016/12/06/153553.41083212.jpg","movieId":211901,"url":"http://vfx.mtime.cn/Video/2016/12/06/mp4/161206120829574892_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/06/mp4/161206120829574892.mp4","videoTitle":"变形金刚5:最后的骑士 中文版预告","videoLength":139,"rating":-1,"type":["动作","冒险","科幻","惊悚"],"summary":"擎天柱怒砍大黄蜂"},{"id":63624,"movieName":"《银河护卫队2》中文预告","coverImg":"http://img5.mtime.cn/mg/2016/12/04/143436.93575096.jpg","movieId":216008,"url":"http://vfx.mtime.cn/Video/2016/12/04/mp4/161204095742030265_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/04/mp4/161204095742030265.mp4","videoTitle":"银河护卫队2 中文版剧场预告片","videoLength":134,"rating":-1,"type":["动作","科幻"],"summary":"英雄“正经不过三秒”"},{"id":63635,"movieName":"《木乃伊》中文版版预告","coverImg":"http://img5.mtime.cn/mg/2016/12/02/103948.81410564.jpg","movieId":207927,"url":"http://vfx.mtime.cn/Video/2016/12/05/mp4/161205114321383228_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/12/05/mp4/161205114321383228.mp4","videoTitle":"木乃伊 中文版预告片","videoLength":142,"rating":-1,"type":["动作","冒险","奇幻","恐怖"],"summary":"木乃伊公主穿越千年卷土重来"},{"id":63545,"movieName":"《萨利机长》终极预告","coverImg":"http://img5.mtime.cn/mg/2016/11/29/150415.97191770.jpg","movieId":225882,"url":"http://vfx.mtime.cn/Video/2016/11/29/mp4/161129103447420466_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/29/mp4/161129103447420466.mp4","videoTitle":"萨利机长 中文终极版预告片","videoLength":117,"rating":8.2,"type":["传记","剧情"],"summary":"揭秘更多迫降镜头"},{"id":63526,"movieName":"《铁道飞虎》海外版预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/28/160045.16620994.jpg","movieId":225093,"url":"http://vfx.mtime.cn/Video/2016/11/28/mp4/161128092413441663_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/28/mp4/161128092413441663.mp4","videoTitle":"铁道飞虎 海外版预告","videoLength":104,"rating":6,"type":["动作","喜剧"],"summary":"成龙黄子韬王凯热血开战"},{"id":63514,"movieName":"《侠盗一号》新预告","coverImg":"http://img5.mtime.cn/mg/2016/11/28/150417.78344291.jpg","movieId":214815,"url":"http://vfx.mtime.cn/Video/2016/11/26/mp4/161126104019065577_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/26/mp4/161126104019065577.mp4","videoTitle":"侠盗一号:星球大战外传 预告片之Trust","videoLength":94,"rating":7.6,"type":["动作","战争","冒险","科幻"],"summary":"展现琴童年时光"},{"id":63480,"movieName":"《猜火车2》国际版预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/24/164345.93655453.jpg","movieId":228230,"url":"http://vfx.mtime.cn/Video/2016/11/24/mp4/161124085202258710_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/24/mp4/161124085202258710.mp4","videoTitle":"猜火车2 国际版预告片","videoLength":122,"rating":-1,"type":["剧情"],"summary":"老友重聚再陷毁灭之旅"},{"id":63470,"movieName":"《沉默》首曝预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/24/110324.29237654.jpg","movieId":51503,"url":"http://vfx.mtime.cn/Video/2016/11/23/mp4/161123171217881971_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/23/mp4/161123171217881971.mp4","videoTitle":"沉默 预告片","videoLength":133,"rating":7.8,"type":["剧情","历史"],"summary":"\"神父\"加菲、尼森饱受折磨"},{"id":63445,"movieName":"《蓝精灵》中文版预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/22/143058.84915993.jpg","movieId":208054,"url":"http://vfx.mtime.cn/Video/2016/11/22/mp4/161122105613271790_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/22/mp4/161122105613271790.mp4","videoTitle":"蓝精灵:失落的村庄 中文版预告片","videoLength":88,"rating":-1,"type":["动画"],"summary":"蓝妹妹“出走”寻找同类"},{"id":63415,"movieName":"《记忆大师》先导预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/21/144656.57866103.jpg","movieId":233371,"url":"http://vfx.mtime.cn/Video/2016/11/20/mp4/161120230220539135_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/20/mp4/161120230220539135.mp4","videoTitle":"记忆大师 先行版预告片","videoLength":92,"rating":-1,"type":["剧情","悬疑"],"summary":"黄渤徐静蕾开启\"记忆追凶\""},{"id":63392,"movieName":"《爱乐之城》法国版预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/18/165916.44114199.jpg","movieId":219784,"url":"http://vfx.mtime.cn/Video/2016/11/18/mp4/161118064612602262_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/18/mp4/161118064612602262.mp4","videoTitle":"爱乐之城 法国版预告片","videoLength":134,"rating":8.2,"type":["爱情","喜剧","剧情","歌舞"],"summary":"高司令石头姐演绎追梦人"},{"id":62863,"movieName":"《那年夏天你去了哪里》首曝预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/12/154021.57265439.jpg","movieId":236875,"url":"http://vfx.mtime.cn/Video/2016/10/11/mp4/161011203317265789_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/11/mp4/161011203317265789.mp4","videoTitle":"那年夏天你去了哪里 “线索版”预告","videoLength":73,"rating":6,"type":["悬疑","剧情"],"summary":"胡歌演反派诠释\"双面杀手\""},{"id":63396,"movieName":"《金刚:骷髅岛》中文预告","coverImg":"http://img5.mtime.cn/mg/2016/11/17/175353.14619263.jpg","movieId":226894,"url":"http://vfx.mtime.cn/Video/2016/11/18/mp4/161118091453407199_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/18/mp4/161118091453407199.mp4","videoTitle":"金刚:骷髅岛 中文版预告片","videoLength":144,"rating":-1,"type":["动作","冒险","奇幻","科幻"],"summary":"超大型金刚狂虐人类"},{"id":63320,"movieName":"《美女与野兽》剧场版预告","coverImg":"http://img5.mtime.cn/mg/2016/11/16/162553.60567933.jpg","movieId":195064,"url":"http://vfx.mtime.cn/Video/2016/11/14/mp4/161114224724894109_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/14/mp4/161114224724894109.mp4","videoTitle":"美女与野兽 剧场版预告片","videoLength":120,"rating":-1,"type":["家庭","奇幻","歌舞","爱情"],"summary":"动画角色场景神还原"},{"id":63309,"movieName":"《攻壳机动队》中文预告","coverImg":"http://img5.mtime.cn/mg/2016/11/14/170926.77331518.jpg","movieId":219801,"url":"http://vfx.mtime.cn/Video/2016/11/13/mp4/161113235155560735_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/13/mp4/161113235155560735.mp4","videoTitle":"攻壳机动队 中文版预告片","videoLength":124,"rating":-1,"type":["动作","犯罪","剧情","科幻"],"summary":"斯嘉丽·约翰逊性感亮相"},{"id":63306,"movieName":"《夜行人生》新预告","coverImg":"http://img5.mtime.cn/mg/2016/11/13/164202.71779109.jpg","movieId":207504,"url":"http://vfx.mtime.cn/Video/2016/11/13/mp4/161113110331104003_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/13/mp4/161113110331104003.mp4","videoTitle":"夜色人生 预告片2","videoLength":125,"rating":-1,"type":["犯罪","剧情"],"summary":"本阿弗莱克自导自演双重人生"},{"id":63289,"movieName":"《星际特工》中文先行预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/11/143347.84705153.jpg","movieId":225003,"url":"http://vfx.mtime.cn/Video/2016/11/11/mp4/161111091703099158_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/11/mp4/161111091703099158.mp4","videoTitle":"星际特工:千星之城 中文版先行预告片","videoLength":97,"rating":-1,"type":["动作","冒险","科幻"],"summary":"戴涵涵与迪瓦伊打情骂俏"},{"id":63246,"movieName":"《萨利机长》中文版预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/08/102729.72002877.jpg","movieId":225882,"url":"http://vfx.mtime.cn/Video/2016/11/08/mp4/161108074015146555_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/08/mp4/161108074015146555.mp4","videoTitle":"萨利机长 中文预告片","videoLength":118,"rating":8.2,"type":["传记","剧情"],"summary":"汤姆汉克斯演绎传奇机长"},{"id":63240,"movieName":"《健忘村》首曝预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/07/141800.50110452.jpg","movieId":231591,"url":"http://vfx.mtime.cn/Video/2016/11/07/mp4/161107094111718495_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/07/mp4/161107094111718495.mp4","videoTitle":"健忘村 预告片","videoLength":76,"rating":-1,"type":["爱情","剧情"],"summary":"舒淇大玩失忆王千源道士打扮"},{"id":63234,"movieName":"《国土安全》第六季先导预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/05/104110.14289788_120X90X4.jpg","movieId":139838,"url":"http://vfx.mtime.cn/Video/2016/11/05/mp4/161105104216840789_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/05/mp4/161105104216840789.mp4","videoTitle":"国土安全 第六季先导预告","videoLength":111,"rating":8.6,"type":["剧情"],"summary":"卡莉等主角回归独缺彼得奎恩"},{"id":63221,"movieName":"《神奇女侠》中文预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/04/153524.20793810.jpg","movieId":40205,"url":"http://vfx.mtime.cn/Video/2016/11/04/mp4/161104115623926251_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/04/mp4/161104115623926251.mp4","videoTitle":"神奇女侠 中文剧场版预告片","videoLength":144,"rating":-1,"type":["动作","冒险","奇幻","科幻"],"summary":"女侠贴身巷战 神秘反派亮相"},{"id":63204,"movieName":"《第一夫人》中文版预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/03/115101.64343559.jpg","movieId":130496,"url":"http://vfx.mtime.cn/Video/2016/11/03/mp4/161103085027980653_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/03/mp4/161103085027980653.mp4","videoTitle":"第一夫人 中国台湾版預告片","videoLength":95,"rating":-1,"type":["传记","剧情"],"summary":"聚焦杰奎琳·肯尼迪四个日夜"},{"id":63180,"movieName":"《极限特工:终极回归》中文版终极预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/02/111805.95893047.jpg","movieId":125805,"url":"http://vfx.mtime.cn/Video/2016/11/02/mp4/161102083059175649_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/11/02/mp4/161102083059175649.mp4","videoTitle":"极限特工:终极回归 中文版终极预告片","videoLength":139,"rating":-1,"type":["动作","冒险","惊悚"],"summary":"范迪塞尔对阵甄子丹"},{"id":63159,"movieName":"鼹鼠之歌2:香港狂骚曲 预告片","coverImg":"http://img5.mtime.cn/mg/2016/11/01/162306.87753756.jpg","movieId":237426,"url":"http://vfx.mtime.cn/Video/2016/10/31/mp4/161031174001749414_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/31/mp4/161031174001749414.mp4","videoTitle":"鼹鼠之歌2:香港狂骚曲 预告片","videoLength":92,"rating":-1,"type":["动作","喜剧"],"summary":"菊川玲二再度出击"},{"id":63150,"movieName":"《异星觉醒》中文预告","coverImg":"http://img5.mtime.cn/mg/2016/10/31/164330.86991619.jpg","movieId":231651,"url":"http://vfx.mtime.cn/Video/2016/10/31/mp4/161031112754888869_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/31/mp4/161031112754888869.mp4","videoTitle":"异星觉醒 中文版预告片","videoLength":134,"rating":-1,"type":["科幻","惊悚"],"summary":"火星生命暗含杀机危及空间站"},{"id":63104,"movieName":"《分裂》全新预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/27/102207.52678396.jpg","movieId":228998,"url":"http://vfx.mtime.cn/Video/2016/10/27/mp4/161027085831347607_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/27/mp4/161027085831347607.mp4","videoTitle":"分裂 先行版预告片2","videoLength":150,"rating":-1,"type":["恐怖","惊悚"],"summary":"麦卡沃伊演绎24重人格"},{"id":63086,"movieName":"《深海浩劫》定档预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/26/115033.64125052.jpg","movieId":216485,"url":"http://vfx.mtime.cn/Video/2016/10/26/mp4/161026092336611200_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/26/mp4/161026092336611200.mp4","videoTitle":"深海浩劫 中国版预告片","videoLength":79,"rating":7.3,"type":["动作","剧情","惊悚"],"summary":"沃尔伯格出镜问候中国影迷"},{"id":63043,"movieName":"《绝世高手》首曝预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/24/094556.77680031.jpg","movieId":236657,"url":"http://vfx.mtime.cn/Video/2016/10/23/mp4/161023202815336328_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/23/mp4/161023202815336328.mp4","videoTitle":"绝世高手 先行版预告片","videoLength":120,"rating":-1,"type":["喜剧"],"summary":"周星驰超级粉丝卢正雨处女作"},{"id":63033,"movieName":"《少年巴比伦》预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/23/155054.20904664.jpg","movieId":215665,"url":"http://vfx.mtime.cn/Video/2016/10/21/mp4/161021192959998933_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/21/mp4/161021192959998933.mp4","videoTitle":"少年巴比伦 “热血版”预告片","videoLength":69,"rating":6.9,"type":["喜剧","爱情"],"summary":"工厂江湖藏龙卧虎青春凶猛"},{"id":63012,"movieName":"《金刚狼3》中文版预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/21/103920.75518105.jpg","movieId":209688,"url":"http://vfx.mtime.cn/Video/2016/10/20/mp4/161020221328633413_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/20/mp4/161020221328633413.mp4","videoTitle":"金刚狼3:殊死一战 中文版预告片","videoLength":106,"rating":-1,"type":["动作","科幻"],"summary":"暮年狼叔为新生代而战"},{"id":63013,"movieName":"《降临》终极版预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/21/103416.87346964.jpg","movieId":221966,"url":"http://vfx.mtime.cn/Video/2016/10/21/mp4/161021080707964346_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/21/mp4/161021080707964346.mp4","videoTitle":"降临 终极预告片","videoLength":60,"rating":7.7,"type":["科幻","悬疑","剧情","惊悚"],"summary":"双11北美对垒李安新作"},{"id":62985,"movieName":"《摆渡人》定档预告","coverImg":"http://img5.mtime.cn/mg/2016/10/20/114906.86879797.jpg","movieId":215724,"url":"http://vfx.mtime.cn/Video/2016/10/20/mp4/161020090627402606_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/20/mp4/161020090627402606.mp4","videoTitle":"摆渡人 先行版预告片","videoLength":76,"rating":5.2,"type":["爱情","喜剧"],"summary":"群星狂欢尽显喜剧特质"},{"id":62986,"movieName":"《银河护卫队2》预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/20/114235.24892481.jpg","movieId":216008,"url":"http://vfx.mtime.cn/Video/2016/10/20/mp4/161020080509518459_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/20/mp4/161020080509518459.mp4","videoTitle":"银河护卫队2 先行版预告片","videoLength":86,"rating":-1,"type":["动作","科幻"],"summary":"格鲁特萌出新境界"},{"id":62966,"movieName":"《刺客信条》新预告","coverImg":"http://img5.mtime.cn/mg/2016/10/19/112340.98815792.jpg","movieId":200591,"url":"http://vfx.mtime.cn/Video/2016/10/18/mp4/161018212137309833_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/18/mp4/161018212137309833.mp4","videoTitle":"刺客信条 预告片2","videoLength":158,"rating":7.2,"type":["动作","冒险","奇幻","科幻"],"summary":"\"法鲨\"刺客基因觉醒"},{"id":62970,"movieName":"《比利林恩》新预告","coverImg":"http://img5.mtime.cn/mg/2016/10/19/101345.32665454.jpg","movieId":217130,"url":"http://vfx.mtime.cn/Video/2016/10/19/mp4/161019171222476200_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/19/mp4/161019171222476200.mp4","videoTitle":"比利·林恩的中场战事 中文版预告片3","videoLength":110,"rating":8,"type":["剧情","战争"],"summary":"战火烟火诠释复杂纠葛"},{"id":62952,"movieName":"《娃娃老板》预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/18/102203.49333729.jpg","movieId":220455,"url":"http://vfx.mtime.cn/Video/2016/10/18/mp4/161018091630713757_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/18/mp4/161018091630713757.mp4","videoTitle":"娃娃老板 先行版预告片","videoLength":136,"rating":-1,"type":["动画","喜剧","家庭"],"summary":"男孩大战婴儿弟弟"},{"id":62938,"movieName":"《罗曼蒂克消亡史》预告","coverImg":"http://img5.mtime.cn/mg/2016/10/17/172246.85687810.jpg","movieId":208911,"url":"http://vfx.mtime.cn/Video/2016/10/17/mp4/161017094832711330_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/17/mp4/161017094832711330.mp4","videoTitle":"罗曼蒂克消亡史 先行版预告片2","videoLength":143,"rating":7.5,"type":["剧情","动作","悬疑"],"summary":"欲火枪火交织绽放"},{"id":62927,"movieName":"《特勤》预告片","coverImg":"http://img5.mtime.cn/mg/2016/10/15/115324.23000502.jpg","movieId":236106,"url":"http://vfx.mtime.cn/Video/2016/10/14/mp4/161014173156449582_480.mp4","hightUrl":"http://vfx.mtime.cn/Video/2016/10/14/mp4/161014173156449582.mp4","videoTitle":"特勤 预告片","videoLength":46,"rating":-1,"type":["科幻"],"summary":"三位捉妖高手对决怪兽"}]}";
一》使用GsonFromat快速生成实体对象(方法可以看我发的那篇方法或百度比较简单)
二》实体类如下:
package cvds.cldvision.com.tablayoutviewpager.ben; import java.util.List; /** * Created by Administrator on 2017/1/24. */ public class UserBen { private List<TrailersBean> trailers; public List<TrailersBean> getTrailers() { return trailers; } public void setTrailers(List<TrailersBean> trailers) { this.trailers = trailers; } public static class TrailersBean { @Override public String toString() { return "TrailersBean{" + "videoTitle='" + videoTitle + '\'' + ", id=" + id + ", movieName='" + movieName + '\'' + ", coverImg='" + coverImg + '\'' + ", movieId=" + movieId + ", url='" + url + '\'' + ", hightUrl='" + hightUrl + '\'' + ", videoLength=" + videoLength + ", rating=" + rating + ", summary='" + summary + '\'' + ", type=" + type + '}'; } /** * id : 64259 * movieName : 《西游伏妖篇》新预告 * coverImg : http://img5.mtime.cn/mg/2017/01/17/140838.90647853.jpg * movieId : 208325 * url : http://vfx.mtime.cn/Video/2017/01/16/mp4/170116173823484498_480.mp4 * hightUrl : http://vfx.mtime.cn/Video/2017/01/16/mp4/170116173823484498.mp4 * videoTitle : 西游伏妖篇 剧场版预告片 * videoLength : 127 * rating : -1 * type : ["动作","奇幻","喜剧","古装"] * summary : 唐僧"重色轻友"与悟空反目 */ private int id; private String movieName; private String coverImg; private int movieId; private String url; private String hightUrl; private String videoTitle; private int videoLength; private int rating; private String summary; private List<String> type; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getMovieName() { return movieName; } public void setMovieName(String movieName) { this.movieName = movieName; } public String getCoverImg() { return coverImg; } public void setCoverImg(String coverImg) { this.coverImg = coverImg; } public int getMovieId() { return movieId; } public void setMovieId(int movieId) { this.movieId = movieId; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getHightUrl() { return hightUrl; } public void setHightUrl(String hightUrl) { this.hightUrl = hightUrl; } public String getVideoTitle() { return videoTitle; } public void setVideoTitle(String videoTitle) { this.videoTitle = videoTitle; } public int getVideoLength() { return videoLength; } public void setVideoLength(int videoLength) { this.videoLength = videoLength; } public int getRating() { return rating; } public void setRating(int rating) { this.rating = rating; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } public List<String> getType() { return type; } public void setType(List<String> type) { this.type = type; } } }三》解析代码分别用三种方法比较
第一中比较麻烦手动,第二种有缺陷,浮点型值会报错会(还不清楚什么原因,以下例子
rating
值),第三种代码量少,效率高
private void parseData(String s) { List<UserBen.TrailersBean> listTrailersBean = new ArrayList<>(); UserBen user = new UserBen(); user.setTrailers(listTrailersBean); if (s != null) { try { //原生的json解析,手动解析 org.json.JSONObject js = new org.json.JSONObject(s); String trailers = js.optString("trailers"); JSONArray jsonArray = new JSONArray(trailers); System.out.println("长度" + jsonArray.length()); for (int i = 0; i < jsonArray.length(); i++) { List<String> list = new ArrayList<>(); org.json.JSONObject json = jsonArray.getJSONObject(i); UserBen.TrailersBean trailersBean = new UserBen.TrailersBean(); trailersBean.setType(list); int id = json.getInt("id"); String coverImg = json.getString("coverImg"); String movieName = json.getString("movieName"); int movieId = json.getInt("movieId"); String url = json.getString("url"); String hightUrl = json.getString("hightUrl"); String videoTitle = json.getString("videoTitle"); int videoLenth = json.getInt("videoLength"); int rating = json.getInt("rating"); String strType = json.getString("type"); trailersBean.setCoverImg(coverImg); trailersBean.setHightUrl(hightUrl); trailersBean.setId(id); trailersBean.setMovieId(movieId); trailersBean.setVideoTitle(videoTitle); trailersBean.setVideoLength(videoLenth); trailersBean.setRating(rating); trailersBean.setUrl(url); trailersBean.setMovieName(movieName); org.json.JSONArray jsonA = new org.json.JSONArray(strType); listTrailersBean.add(trailersBean); for (int j = 0; j < jsonA.length(); j++) { String dy = jsonA.getString(j); list.add(dy); } } textView1.setText(listTrailersBean.toString()); //Gson解析 Gson gon = new Gson(); List<UserBen.TrailersBean> o = gon.fromJson(trailers, new TypeToken<List<UserBen.TrailersBean>>() {}.getType()); textView.setText(o.toString()); } catch (JSONException e) { e.printStackTrace(); } // fastjson解析 JSONObject jsonObject = JSON.parseObject(s); String str = jsonObject.getString("trailers"); UserBen user1 = new UserBen(); List<UserBen.TrailersBean> userBens = JSON.parseArray(str, UserBen.TrailersBean.class); user1.setTrailers(userBens); textView.setText(userBens.toString()); } }记得导入Gson 与FastJson包