admin管理员组

文章数量:1026989

My manifest is shown down below. I'm not sure why Google Chrome always says that it is not a valid JSON and Dictionary Keys are not quoted. Any help is appreciated. Thanks.

{
    "name": "Auto Add to Cart",
    "version": "1.2",
    "manifest_version": 2,
}

My manifest is shown down below. I'm not sure why Google Chrome always says that it is not a valid JSON and Dictionary Keys are not quoted. Any help is appreciated. Thanks.

{
    "name": "Auto Add to Cart",
    "version": "1.2",
    "manifest_version": 2,
}
Share Improve this question edited Aug 11, 2013 at 21:01 Felix Kling 818k181 gold badges1.1k silver badges1.2k bronze badges asked Aug 11, 2013 at 19:41 user2672984user2672984 91 silver badge4 bronze badges 5
  • Nice pretty pictures: json – Paul Commented Aug 11, 2013 at 19:43
  • 1 You should check out JSONLint, it's a great tool for validating JSON. – ixchi Commented Aug 11, 2013 at 19:45
  • This looks like someone created their JSON as a string in a loop. – Paul Commented Aug 11, 2013 at 19:46
  • @Paul As it's a manifest for a Chrome extension, it's probably just bad copy-pasta. – Denys Séguret Commented Aug 11, 2013 at 20:01
  • Still get the same message from Google Chrome. Even after fixing what was wrong. – user2672984 Commented Aug 11, 2013 at 22:23
Add a ment  | 

1 Answer 1

Reset to default 6

You can't have a trailing ma in JSON. Remove the ma after the 2.

Here's how an object is defined :

(source : json)

My manifest is shown down below. I'm not sure why Google Chrome always says that it is not a valid JSON and Dictionary Keys are not quoted. Any help is appreciated. Thanks.

{
    "name": "Auto Add to Cart",
    "version": "1.2",
    "manifest_version": 2,
}

My manifest is shown down below. I'm not sure why Google Chrome always says that it is not a valid JSON and Dictionary Keys are not quoted. Any help is appreciated. Thanks.

{
    "name": "Auto Add to Cart",
    "version": "1.2",
    "manifest_version": 2,
}
Share Improve this question edited Aug 11, 2013 at 21:01 Felix Kling 818k181 gold badges1.1k silver badges1.2k bronze badges asked Aug 11, 2013 at 19:41 user2672984user2672984 91 silver badge4 bronze badges 5
  • Nice pretty pictures: json – Paul Commented Aug 11, 2013 at 19:43
  • 1 You should check out JSONLint, it's a great tool for validating JSON. – ixchi Commented Aug 11, 2013 at 19:45
  • This looks like someone created their JSON as a string in a loop. – Paul Commented Aug 11, 2013 at 19:46
  • @Paul As it's a manifest for a Chrome extension, it's probably just bad copy-pasta. – Denys Séguret Commented Aug 11, 2013 at 20:01
  • Still get the same message from Google Chrome. Even after fixing what was wrong. – user2672984 Commented Aug 11, 2013 at 22:23
Add a ment  | 

1 Answer 1

Reset to default 6

You can't have a trailing ma in JSON. Remove the ma after the 2.

Here's how an object is defined :

(source : json)

本文标签: javascriptManifest is not Valid JSON What is wrongStack Overflow