Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

169
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda