开发者社区> 问答> 正文

fastjson在解析一段数据时报错?报错

{"预告片":[{"VideoID":46038,"MovieID":102705,"Title":"了不起的盖茨比 中国版预告片","ShortTitle":"中国版预告片","TitleSamll":"中国版预告片","Description":"导演巴兹·鲁曼以其惯常的视觉系手法打造出一场场极致奢华的盛宴。","Length":"01:26","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/125719.55108053_235X132X4.jpg","PlayCount":103601,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/46038/?mid=102705"},{"VideoID":46062,"MovieID":102705,"Title":"了不起的盖茨比 中文版剧情预告片","ShortTitle":"中文版剧情预告片","TitleSamll":"中文版剧情预告片","Description":"","Length":"02:25","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/134910.69160565_235X132X4.jpg","PlayCount":49434,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/46062/?mid=102705"},{"VideoID":46071,"MovieID":102705,"Title":"了不起的盖茨比 中文问候版预告片","ShortTitle":"中文问候版预告片","TitleSamll":"中文问候版预告片","Description":"","Length":"01:27","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/125831.66291599_235X132X4.jpg","PlayCount":18315,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/46071/?mid=102705"},{"VideoID":44616,"MovieID":102705,"Title":"了不起的盖茨比 中文版预告片1","ShortTitle":"中文版预告片1","TitleSamll":"中文版预告片1","Description":"","Length":"01:32","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/06/043822.85243909_235X132X4.jpg","PlayCount":35105,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/44616/?mid=102705"},{"VideoID":44640,"MovieID":102705,"Title":"了不起的盖茨比 中文版预告片2","ShortTitle":"中文版预告片2","TitleSamll":"中文版预告片2","Description":"","Length":"01:32","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/125044.24711919_235X132X4.jpg","PlayCount":22304,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/44640/?mid=102705"},{"VideoID":45993,"MovieID":102705,"Title":"了不起的盖茨比 中文版预告片3","ShortTitle":"中文版预告片3","TitleSamll":"中文版预告片3","Description":"","Length":"02:21","HD":0,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/134704.79061271_235X132X4.jpg","PlayCount":10490,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/45993/?mid=102705"},{"VideoID":46084,"MovieID":102705,"Title":"了不起的盖茨比 中文版宣传片","ShortTitle":"中文版宣传片","TitleSamll":"中文版宣传片","Description":"","Length":"02:43","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/125910.60333617_235X132X4.jpg","PlayCount":20789,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/46084/?mid=102705"},{"VideoID":38920,"MovieID":102705,"Title":"了不起的盖茨比 预告片1","ShortTitle":"预告片1","TitleSamll":"预告片1","Description":"","Length":"02:26","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/06/032756.76688804_235X132X4.jpg","PlayCount":77865,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/38920/?mid=102705"},{"VideoID":42528,"MovieID":102705,"Title":"了不起的盖茨比 预告片2","ShortTitle":"预告片2","TitleSamll":"预告片2","Description":"","Length":"02:33","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2014/03/16/175406.88509435_235X132X4.jpg","PlayCount":61908,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/42528/?mid=102705"},{"VideoID":44078,"MovieID":102705,"Title":"了不起的盖茨比 终极版预告片","ShortTitle":"终极版预告片","TitleSamll":"终极版预告片","Description":"","Length":"02:43","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/163353.40067491_235X132X4.jpg","PlayCount":65986,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/44078/?mid=102705"},{"VideoID":44122,"MovieID":102705,"Title":"了不起的盖茨比 英国版预告片","ShortTitle":"英国版预告片","TitleSamll":"英国版预告片","Description":"","Length":"01:32","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2014/03/16/175524.84336291_235X132X4.jpg","PlayCount":5025,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/44122/?mid=102705"},{"VideoID":43920,"MovieID":102705,"Title":"了不起的盖茨比 电视宣传片","ShortTitle":"电视宣传片","TitleSamll":"电视宣传片","Description":"","Length":"00:33","HD":0,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/000719.22367333_235X132X4.jpg","PlayCount":8695,"VideoType":0,"VideoTypeName":"预告片","Url":"http://video.mtime.com/43920/?mid=102705"}],"精彩片段":[{"VideoID":44466,"MovieID":102705,"Title":"了不起的盖茨比 片段之Who Is This, Gatsby?","ShortTitle":"片段之Who Is This, Gatsby?","TitleSamll":"片段之Who Is T..","Description":"","Length":"00:41","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/090952.67433591_235X132X4.jpg","PlayCount":2887,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/44466/?mid=102705"},{"VideoID":44467,"MovieID":102705,"Title":"了不起的盖茨比 片段之One More Question","ShortTitle":"片段之One More Question","TitleSamll":"片段之One More..","Description":"","Length":"00:57","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/090954.74088378_235X132X4.jpg","PlayCount":2077,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/44467/?mid=102705"},{"VideoID":44468,"MovieID":102705,"Title":"了不起的盖茨比 片段之You Must Know Gatsby","ShortTitle":"片段之You Must Know Gatsby","TitleSamll":"片段之You Must..","Description":"","Length":"00:34","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2014/03/16/175733.46497360_235X132X4.jpg","PlayCount":1456,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/44468/?mid=102705"},{"VideoID":44469,"MovieID":102705,"Title":"了不起的盖茨比 片段之Next Train","ShortTitle":"片段之Next Train","TitleSamll":"片段之Next Train","Description":"","Length":"00:46","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/090959.43706269_235X132X4.jpg","PlayCount":686,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/44469/?mid=102705"},{"VideoID":44470,"MovieID":102705,"Title":"了不起的盖茨比 片段之Imagination","ShortTitle":"片段之Imagination","TitleSamll":"片段之Imaginat..","Description":"","Length":"00:34","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/091002.10057911_235X132X4.jpg","PlayCount":1602,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/44470/?mid=102705"},{"VideoID":44594,"MovieID":102705,"Title":"了不起的盖茨比 片段之Constantly Asked About Daisy","ShortTitle":"片段之Constantly Asked About Daisy","TitleSamll":"片段之Constant..","Description":"","Length":"00:47","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/124918.47745308_235X132X4.jpg","PlayCount":847,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/44594/?mid=102705"},{"VideoID":44597,"MovieID":102705,"Title":"了不起的盖茨比 片段之Can't Repeat the Past","ShortTitle":"片段之Can't Repeat the Past","TitleSamll":"片段之Can't Re..","Description":"","Length":"00:24","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/124921.95927994_235X132X4.jpg","PlayCount":952,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/44597/?mid=102705"},{"VideoID":51366,"MovieID":102705,"Title":"插曲《young and beautiful》","ShortTitle":"and beautiful》","TitleSamll":"and beautiful》","Description":"","Length":"01:33","HD":0,"ImagePath":"http://img31.mtime.cn/mg/2014/11/12/130432.26987456_235X132X4.jpg","PlayCount":11151,"VideoType":1,"VideoTypeName":"精彩片段","Url":"http://video.mtime.com/51366/?mid=102705"}],"拍摄花絮":[{"VideoID":46134,"MovieID":102705,"Title":"了不起的盖茨比 中文版制作特辑","ShortTitle":"中文版制作特辑","TitleSamll":"中文版制作特辑","Description":"","Length":"02:03","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2014/03/16/175142.35588599_235X132X4.jpg","PlayCount":26725,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/46134/?mid=102705"},{"VideoID":46024,"MovieID":102705,"Title":"了不起的盖茨比 中文制作特辑之了不起的音乐","ShortTitle":"中文制作特辑之了不起的音乐","TitleSamll":"中文制作特辑之..","Description":"","Length":"04:42","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/134752.59325438_235X132X4.jpg","PlayCount":2047,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/46024/?mid=102705"},{"VideoID":45962,"MovieID":102705,"Title":"了不起的盖茨比 中文制作特辑之3D造梦","ShortTitle":"中文制作特辑之3D造梦","TitleSamll":"中文制作特辑之..","Description":"","Length":"02:30","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/091823.44534666_235X132X4.jpg","PlayCount":3650,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/45962/?mid=102705"},{"VideoID":46034,"MovieID":102705,"Title":"了不起的盖茨比 中文制作特辑之普拉达","ShortTitle":"中文制作特辑之普拉达","TitleSamll":"中文制作特辑之..","Description":"","Length":"03:22","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/134832.83606730_235X132X4.jpg","PlayCount":698,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/46034/?mid=102705"},{"VideoID":46033,"MovieID":102705,"Title":"了不起的盖茨比 中文制作特辑之蒂凡尼","ShortTitle":"中文制作特辑之蒂凡尼","TitleSamll":"中文制作特辑之..","Description":"","Length":"03:00","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/134827.32880992_235X132X4.jpg","PlayCount":403,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/46033/?mid=102705"},{"VideoID":46044,"MovieID":102705,"Title":"了不起的盖茨比 中文制作特辑之布鲁克斯兄弟","ShortTitle":"中文制作特辑之布鲁克斯兄弟","TitleSamll":"中文制作特辑之..","Description":"","Length":"04:06","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/125743.12918897_235X132X4.jpg","PlayCount":294,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/46044/?mid=102705"},{"VideoID":44559,"MovieID":102705,"Title":"了不起的盖茨比 制作特辑之3D","ShortTitle":"制作特辑之3D","TitleSamll":"制作特辑之3D","Description":"","Length":"02:33","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/06/044144.19971842_235X132X4.jpg","PlayCount":380,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/44559/?mid=102705"},{"VideoID":44561,"MovieID":102705,"Title":"了不起的盖茨比 制作特辑之World of Gatsby","ShortTitle":"制作特辑之World of Gatsby","TitleSamll":"制作特辑之Worl..","Description":"","Length":"02:03","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2014/03/16/180059.74460818_235X132X4.jpg","PlayCount":314,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/44561/?mid=102705"},{"VideoID":44560,"MovieID":102705,"Title":"了不起的盖茨比 制作特辑之Great Music is Timeless","ShortTitle":"制作特辑之Great Music is Timeless","TitleSamll":"制作特辑之Grea..","Description":"","Length":"04:42","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/06/044150.52275203_235X132X4.jpg","PlayCount":476,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/44560/?mid=102705"},{"VideoID":44580,"MovieID":102705,"Title":"了不起的盖茨比 拍摄直击-上","ShortTitle":"拍摄直击-上","TitleSamll":"拍摄直击-上","Description":"","Length":"05:27","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/124904.11508993_235X132X4.jpg","PlayCount":528,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/44580/?mid=102705"},{"VideoID":44583,"MovieID":102705,"Title":"了不起的盖茨比 拍摄直击-中","ShortTitle":"拍摄直击-中","TitleSamll":"拍摄直击-中","Description":"","Length":"05:29","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/124910.39964297_235X132X4.jpg","PlayCount":393,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/44583/?mid=102705"},{"VideoID":44586,"MovieID":102705,"Title":"了不起的盖茨比 拍摄直击-下","ShortTitle":"拍摄直击-下","TitleSamll":"拍摄直击-下","Description":"","Length":"05:15","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/124916.73453551_235X132X4.jpg","PlayCount":528,"VideoType":2,"VideoTypeName":"拍摄花絮","Url":"http://video.mtime.com/44586/?mid=102705"}],"更多":[{"VideoID":44491,"MovieID":102705,"Title":"了不起的盖茨比 纽约全球首映礼","ShortTitle":"纽约全球首映礼","TitleSamll":"纽约全球首映礼","Description":"","Length":"03:33","HD":1,"ImagePath":"http://img31.mtime.cn/mg/2013/11/05/124500.10050571_235X132X4.jpg","PlayCount":1815,"VideoType":4,"VideoTypeName":"更多","Url":"http://video.mtime.com/44491/?mid=102705"}]}

这是那段json字符串,直接利用爬虫冲网站上抓下来的

当我解析时,出现这个错误,求大神解决

展开
收起
爱吃鱼的程序员 2020-06-10 14:50:12 514 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    多了]

    你直接把JSONObject转换成List所以出了问题,你需要取出这个JSONObject中的JSONArray,才能JSON.parseArray

    <preclass="brush:java;toolbar:true;auto-links:false;">JSONObjectjObj=JSON.parseObject(json);//先转成JSONObjectJSONArrayjArray=jObj.get("预告片");//取出其中需要的ArrayList<JsonModel>=jsonmodel1=JSON.parseArray(jArray.toJSONString(),JsonModel.class);//转换成List



    2L正解

    2020-06-10 14:50:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
神龙云服务器产品及技术深度解析 立即下载
弹性创造价值:基于ECS的最佳性价比实践解析 立即下载
又快又稳:阿里云下一代虚拟交换机解析 立即下载

相关镜像