Javascript 解析期间Http失败

Javascript 解析期间Http失败,javascript,angular,typescript,ionic-framework,Javascript,Angular,Typescript,Ionic Framework,我正在做一个学校项目,我们必须创建一个应用程序。一页包含教授提供的正确/错误问题,学生可以回答。页面完成了,除了获取问题和答案密钥的http请求。我目前正在用postmann模拟服务器。postmann works对提供链接的请求 然而,我总是遇到JSON解析错误 这是我尝试使用的JSON字符串之一 { „question“ : „what is 2x2?“ , „answerKey“ : true } 这是我收到的错误信息: SyntaxError: "JSON.parse: expecte

我正在做一个学校项目,我们必须创建一个应用程序。一页包含教授提供的正确/错误问题,学生可以回答。页面完成了,除了获取问题和答案密钥的http请求。我目前正在用postmann模拟服务器。postmann works对提供链接的请求

然而,我总是遇到JSON解析错误

这是我尝试使用的JSON字符串之一

{
„question“ : „what is 2x2?“ ,
„answerKey“ : true
}
这是我收到的错误信息:

SyntaxError: "JSON.parse: expected property name or '}' at line 2 column 1 of the JSON data"
问题类有两个属性:

answerKey: boolean;

下面您可以看到我的http.get函数和调用get函数的函数

public getAllQuestions(): Observable<Question[]> {
        return this.http.get<Question[]>(this.baseurl.concat('quiz'));
    }

public pullQuestionFromBackend(): void {
        this.submitQuizService.getAllQuestions().subscribe((question: Question[]) => {
            this.questionList = <Question[]> question;
        });
    }
publicGetAllQuestions():可观察{
返回this.http.get(this.baseurl.concat('quick');
}
public pullQuestionFromBackend():void{
this.submitQuizService.getAllQuestions().subscribe((问题:问题[]))=>{
this.questionList=问题;
});
}

这不是有效的JSON格式

不同于

试一试

{
"question" : "what is 2x2?" ,
"answerKey" : true
}

好的,修复了我的解析错误,谢谢!但是,现在我发现了一个描述性较差的错误:Http失败响应(未知url):0未知错误对于该部分,请查看已经存在的错误
{
"question" : "what is 2x2?" ,
"answerKey" : true
}