Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I get a "Expected name at XX:YY" error on .json files in Eclipse. What is wrong?

I have this code in it now...with the entra line after the closing }...

Here is a larger screenshot of it now!

{
  "menu" : {
    "id": "file",
    "value": "File",
    "popup": {
      "menuitem": [
        { "value" : "New", "onclick": "CreateNewDoc()" },
        { "value" : "Open", "onclick": "OpenDoc()" },
        { "value" : "Close", "onclick": "CloseDoc()" }
      ]
    }
  }
}
like image 730
beth Avatar asked Dec 15 '16 16:12

beth


1 Answers

You haven't closed the } at the end of the json. The correct json would be as follows.

{
  "menu" : {
    "id": "file",
    "value": "File",
    "popup": {
      "menuitem": [
        { "value" : "New", "onclick": "CreateNewDoc()" },
        { "value" : "Open", "onclick": "OpenDoc()" },
        { "value" : "Close", "onclick": "CloseDoc()" }
      ]
    }
  }
}
like image 160
Sudheesh Singanamalla Avatar answered Sep 29 '22 16:09

Sudheesh Singanamalla