In my controller I do a http GET
request to fetch a JSON array.
However, before I'm able to do anything with this JSON array, Angular gives a parsing error.
JSON array:
[
[
"",
"postcond",
"Stéphanie:stap 1",
"Actor1:stap 2",
"Stéphanie:stap 3"
],
[
"",
"postcond",
"Stéphanie:stap 1",
"Actor1:stap 2",
"Stéphanie:stap 1"
]
]
http request:
$http.get(serverPrefix + "project/" + projectid + "/usecase/" + usecaseid+"/stories")
.success(function (response) {
})
.error(function (response) {$location.path('/project/'+projectid+'/usecase/'+usecaseid); });
the error:
SyntaxError: Unexpected token [
at Object.parse (native)
at pc (http://vopro5.ugent.be/stephanie/scripts/angular.min.js:14:208)
at Zb (http://vopro5.ugent.be/stephanie/scripts/angular.min.js:76:379)
at http://vopro5.ugent.be/stephanie/scripts/angular.min.js:77:237
at s (http://vopro5.ugent.be/stephanie/scripts/angular.min.js:7:302)
at Zc (http://vopro5.ugent.be/stephanie/scripts/angular.min.js:77:219)
at c (http://vopro5.ugent.be/stephanie/scripts/angular.min.js:78:349)
at http://vopro5.ugent.be/stephanie/scripts/angular.min.js:112:20
at l.$get.l.$eval (http://vopro5.ugent.be/stephanie/scripts/angular.min.js:125:305)
at l.$get.l.$digest (http://vopro5.ugent.be/stephanie/scripts/angular.min.js:122:398)
According to http://jsonlint.com/ it's a valid JSON string.