Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

162
Visualizações
How to change my content-type of a json file in JS

I have been working with a Json file and javascript. While opening the file I recieved this error

SyntaxError: Unexpected token e in JSON at position 0

After Some research I found out that my JSON file's content-type is actually set to html. But now I don't know how to change the content-type of my file to json. enter image description here

function generateRow(){
  console.log("WORKING");

  fetch('./addplaylist.json')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.log(error));
  
  }

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda