1
I am using an application with vuejs and Node, and I need to get information through a . json, but when making the request I get the following error:
Syntaxerror: JSON.parse: Unexpected Character at line 1 column 1 of the JSON data
My Json is correct, follow the code:
getCars(){
fetch('../data/carros.json')
.then(resp => resp.json())
.then(data => console.log(data));
}
},
mounted(){
this.getCars();
}