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

174
Vistas
Removing EOF causing invalid syntax

How do will we get rid of the end of file error? The brackets seem valid according to ecma, unclear what's missing. Used jsonlint and found this:

*Error: Parse error on line 16:
...States"      }]  }]}{    "id": 1,    "name":
------------------^
Expecting 'EOF', '}', ',', ']', got '{'*

How can we fix the error? See code below.

{
//   "summersalads": [
//     {
//       "id":0,
//       "name": "Tabouli",
//       "web":"The Hungry Greek.com",
//       "description":"Crisp Romaine lettuce, with chopped cucumbers, olives, topped with Feta cheese and hummus",
//       "addresses":[
//         {
//           "addressid":"0",
//           "number":"808",
//           "line1":"N.",
//           "line2":"Franklin St",
//           "zipcode":"33602",
//           "country":"United States"
//         }
//         ]
//       }
//     ]
//   }

//     {
//   "id":1,
//   "name":"Papaya Salad",
//   "restaurant":"Ahi Asian Bistro",
//   "web":"www.ahiasianbistro.com",
//   "description":"Shrimp, green papaya, garlic, tomato, carrrot, green beans, peanut, lime juice dressing",
//   "addresses":[
//     {
//       "addressid":"1",
//       "number":"14841",
//       "line1":"N.",
//       "line2":"Dale Mabry",
//       "zipcode":"33618",
//       "country":"United States"
//     }
//   ]
// }

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

your json is not valid. The error message shows that you need a comma , between the objects, and move ] and add } to the end of your json too. Your json should be

{
    "summersalads": [
        {
            "id": 0,
            "name": "Tabouli",
            "web": "The Hungry Greek.com",
            "description": "Crisp Romaine lettuce, with chopped cucumbers, olives, topped with Feta cheese and hummus",
            "addresses": [
                {
                    "addressid": "0",
                    "number": "808",
                    "line1": "N.",
                    "line2": "Franklin St",
                    "zipcode": "33602",
                    "country": "United States"
                }
            ]
        },          
        {
            "id": 1,
            "name": "Papaya Salad",
            "restaurant": "Ahi Asian Bistro",
            "web": "www.ahiasianbistro.com",
            "description": "Shrimp, green papaya, garlic, tomato, carrrot, green beans, peanut, lime juice dressing",
            "addresses": [
                {
                    "addressid": "1",
                    "number": "14841",
                    "line1": "N.",
                    "line2": "Dale Mabry",
                    "zipcode": "33618",
                    "country": "United States"
                }
            ]
        }
    ]
}
about 4 years ago · Juan Pablo Isaza Denunciar
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