开发者

Syntax error while creating a google chrome extension

开发者 https://www.devze.com 2023-01-18 01:19 出处:网络
I keep getting a syntax error everytime I try to load the follow manifest.json: { \"name\":\"Reada\", \"version\":\"1.0\",

I keep getting a syntax error everytime I try to load the follow manifest.json:

{ 
"name":"Reada",
"version":"1.0",
"description":"An extension to enable functionality of Arc90's readability",
"background_page":"noway.html",
"browser_action":{ "default_icon":"hello.png" }
"permissions":"tabs"
}

Line 7, column 1, 开发者_开发问答syntax error.


You are missing a comma after the "browser_action" entry. I find it handy to paste the JSON into a Python shell, which picks up syntax errors in a flash:

>>> { 
... "name":"Reada",
... "version":"1.0",
... "description":"An extension to enable functionality of Arc90's readability",
... "background_page":"noway.html",
... "browser_action":{ "default_icon":"hello.png" }
... "permissions":"tabs"
  File "<stdin>", line 7
    "permissions":"tabs"
                ^
SyntaxError: invalid syntax
>>> }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号