javascript - Manifest is not Valid JSON. What is wrong? - Stack Overflow

My manifest is shown down below. I'm not sure why Google Chrome always says that it is not a valid

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)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745663078a4638955.html

相关推荐

  • javascript - Manifest is not Valid JSON. What is wrong? - Stack Overflow

    My manifest is shown down below. I'm not sure why Google Chrome always says that it is not a valid

    5小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信