Reputation:
So i'm currently developing a Chrome web extension, but whenever I try to upload it, it comes up with "Error: manifest.json5:0 unterminated string". Is anyone able to help me fix this? It seems to be the only file that has a problem.
{
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html”,
"description": “Damn Daniel!”,
},
"manifest_version": 2,
"name": ““,
"permissions": [ "activeTab" ],
"version": "0.69”,
}
Upvotes: 1
Views: 143
Reputation: 101
You have some sort of other quote character on this line (as well as some of your other lines):
"default_popup": "popup.html”,
as you can see, after popup.html you have a different style quotation mark (curly quote) - this will cause Chrome to believe it is a regular character, not a quote that ends a string value. I would replace it with a proper quote, and replace all of your curly quotes with this!
Upvotes: 0
Reputation: 683
You're using curly quotes ”
. These are their own hexidecimal characters and different from the straight-quote which programming uses ("
). This probably arose from copy and pasting from a word document.
You also put commas before your closing }
's. That's a no-no, as comma means it's expecting another json field to be there.
This is the valid json without the curly quotes and erroneous commas:
{
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html",
"description": "Damn Daniel!"
},
"manifest_version": 2,
"name": "",
"permissions": ["activeTab"],
"version": "0.69"
}
I'd recommend running your code through a json lint tool to catch these sorts of issues.
Upvotes: 1
Reputation: 5113
You've got curly quotes in there. Replace them with straight quotes.
Upvotes: 0