Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

423
Views
Esperando el error 'EOF' al importar un archivo json en MongoDB

Estoy tratando de importar el siguiente archivo json a MongoDB con Compass pero aparece un error:

 Unexpected token � in JSON at position 0 while parsing near '�' in C:\Users\antoi\Downloads\restaurants.json > 1 | � | ^

Luego traté de probarlo desde otra fuente pero no funcionó:

 Error: Parse error on line 10: ...s Park Bake Shop"} { "_id": { "$oid" ----------------------^ Expecting 'EOF', '}', ',', ']', got '{'

falta una comilla? Pero cuando agrego una comilla me da:

 Error: Parse error on line 10: ...is Park Bake Shop"}, { "_id": { "$oi ----------------------^ Expecting 'EOF', got ','
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Usar mongoimport

 mongoimport --db myDb --collection restaurants --file restaurants.json

restaurants.json no es un JSON válido, no está envuelto en una matriz ni tiene comas al final.

https://docs.mongodb.com/manual/reference/mongodb-extended-json/

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!