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"
// }
// ]
// }
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"
}
]
}
]
}