Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    JSON Coding Problem - Help please!

    Hey, guys! I've been trying to write some code for a Chrome App, but every time I try to finally upload it, I receive an error message:

    Manifest is not valid JSON. Line: 1, column: 2, Dictionary keys must be quoted.


    I've searched for hours trying to troubleshoot this, but have yet to resolve the issue. I have gone through and individually retyped each quotation mark and comma. It also passes a JSON tester so I'm really at a loss. Any help would be really appreciated - thanks!


    {
    "name": "Netflix",
    "description": "Netflix",
    "version": "1.0",
    "icons": {
    "128": "128.png"
    },
    "app": {
    "urls": [
    "http: //movies.netflix.com/wihome"
    ],
    "launch": {
    "web_url": "http: //movies.netflix.com/home"
    }
    },
    "permissions": [
    "unlimitedStorage",
    "notifications"
    ]
    }

  • #2
    New Coder
    Join Date
    Jul 2012
    Location
    Ukraine
    Posts
    71
    Thanks
    1
    Thanked 18 Times in 17 Posts
    This is a valid JSON. Maybe the problem is that some extra characters such as a BOM are added to the file?

  • Users who have thanked oneguy for this post:

    Zydeco (08-24-2012)

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,277
    Thanks
    10
    Thanked 581 Times in 562 Posts
    Quote Originally Posted by oneguy View Post
    This is a valid JSON. Maybe the problem is that some extra characters such as a BOM are added to the file?
    continuing on that, try running strJSON.trim() before you parse it...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • Users who have thanked rnd me for this post:

    Zydeco (08-24-2012)

  • #4
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks for the responses! It kept saving as .rtf instead of plain text so that was the initial problem. Unfortunately, I now get the error message:

    Invalid value for 'app.urls[0]': Wrong scheme type.

    Any help?

  • #5
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts
    For anyone experiencing this problem, make sure to check that the manifest text is saved as a plain text instead of a rich text file. Also check all commas and quotation marks.

    My second issue was due to a space after the colon in http that I kept overlooking.

    Thanks for your help guys!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •