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

175
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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