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

168
Vistas
JSON bundled with JS Unexpected SyntaxError

I have a python script that ingests a .txt file and outputs a JSON file. I use linter to ensure that the format of my JSON file is accurate. After, I run my JSON file through this line in terminal:

browserify -g reactify ./directory.js -o ./bundle.js

Which takes the contents of my JSON file and bundles them with my 'directory.js' file and outputs the bundle as 'bundle.js'.

Bundle.js is kept in my static folder for a node.js server that I run. However, when I run my localhost to see the results of my process I receive the error message:

Uncaught SyntaxError: JSON.parse: expected property name or '}' at line 1 column 2 of the JSON data

But I am not sure why. Every step of my process seems to be accurate. If I change different things in my python file, the error message may update to something like 'unexpected s found at line...' or 'unexpected : found'... I can't discern where the problem is.

The only thing that I can think is that somehow, when I bundle my JSON with my directory.js, browserify or reactify is altering the JSON somehow

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