我试图从这个JSON数据中获取brad pitt的电影片头,但我不断收到错误:
"尝试解析JSON数据。在JSON数据的第7行第131列的字符串文字中得到错误"错误的控制字符"
这是我的Angular 1 Controller:
angular.module('superActorQuiz.question', [])
.controller('questionController', function ($scope, $http, $window) {
console.log('in questionController')
$scope.movie;
$http.get("themoviedb_data.json")
.then(function (response) {
console.log('results',response.data);
$scope.games = response.data.results[0].title.map(function(item) {
console.log(item)
return item;
});
})
})
这是布拉德皮特电影的JSON数据的第一部分。第7行将是电影Fury的概述开始。我已经尝试了我的控制器代码http.get,和其他json对象一起工作。关于为什么我用这个Json数据得到错误的任何想法?
{
"page": 1,
"results":
[{
"poster_path": "\/il9XWx5CbNd2KdDUwrcClEZiLkv.jpg",
"adult": false,
"overview": "Last months of World War II in April 1945. As the Allies make their final push in the European Theater,
a battle-hardened U.S. Army sergeant in the 2nd Armored Division named Wardaddy commands a Sherman tank called \"Fury\" and its five-man crew on a deadly mission behind enemy lines. Outnumbered and outgunned,
Wardaddy and his men face overwhelming odds in their heroic attempts to strike at the heart of Nazi Germany.",
"release_date": "2014-10-15",
"genre_ids": [10752,
18,
28],
"id": 228150,
"original_title": "Fury",
"original_language": "en",
"title": "Fury",
"backdrop_path": "\/pKawqrtCBMmxarft7o1LbEynys7.jpg",
"popularity": 11.717304,
"vote_count": 2435,
"video": false,
"vote_average": 7.43
}, {
"poster_path": "\/adw6Lq9FiC9zjYEpOqfq03ituwp.jpg",
"adult": false,
"overview": "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on,
with underground \"fight clubs\" forming in every town,
until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.",
"release_date": "1999-10-14",
"genre_ids": [18],
"id": 550,
"original_title": "Fight Club",
"original_language": "en",
"title": "Fight Club",
"backdrop_path": "\/8uO0gUM8aNqYLs1OsTBQiXu0fEv.jpg",
"popularity": 7.681482,
"vote_count": 5581,
"video": false,
"vote_average": 8.07
}, {
"poster_path": "\/p11Ftd4VposrAzthkhF53ifYZRl.jpg",
"adult": false,
"overview": "The men who made millions from a global economic meltdown.",
"release_date": "2015-12-11",
"genre_ids": [18,
35],
"id": 318846,
"original_title": "The Big Short",
"original_language": "en",
"title": "The Big Short",
"backdrop_path": "\/jmlMLYEsYY1kRc5qHIyTdxCeVmZ.jpg",
"popularity": 6.207392,
"vote_count": 1395,
"video": false,
"vote_average": 7.26
}]}
非常感谢!