Tom Maxwell
Tom Maxwell

Reputation: 9573

Chrome extension issue: Dictionary keys must be quoted

Trying to make my first Chrome extension and getting the follow error: Manifest is not valid JSON. Line:2, column:4, Dictionary keys must be quoted. Here's my Manifest.JSON:

{
  “manifest_version”: 2,
  "name": "James Hipstour",
  "description": "Replace all mentions of 'hipster' with James Montour.",
  "version": "1.0”,
  "content_scripts": [
    {
      "matches": ["http://jquery.com/*"],
      "js": ["jquery-2.1.1.js", "content.js"]
    }
  ],
  "background_page": "background.html"
}

Any ideas?

Upvotes: 3

Views: 12599

Answers (2)

random-forest-cat
random-forest-cat

Reputation: 35974

This happened for me when I specified an invalid script for the background:scripts key.

By correcting the path, the issue was resolved.

Upvotes: 0

John Kugelman
John Kugelman

Reputation: 361937

“manifest_version”: 2,
...
"version": "1.0”,

Those smart quotes need to be changed to "plain" ones.

"manifest_version": 2,
...
"version": "1.0",

See the difference?

When you edit code, make sure you do it in a plain text editor like Notepad. Stay away from word processors like Word.

Upvotes: 16

Related Questions