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

173
Views
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 answers
Answer question

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 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!