Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-20-2012, 04:17 AM   PM User | #1
Zydeco
New to the CF scene

 
Join Date: Aug 2012
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Zydeco is an unknown quantity at this point
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"
]
}
Zydeco is offline   Reply With Quote
Old 08-20-2012, 05:22 PM   PM User | #2
oneguy
New Coder

 
Join Date: Jul 2012
Location: Ukraine
Posts: 68
Thanks: 1
Thanked 18 Times in 17 Posts
oneguy is an unknown quantity at this point
This is a valid JSON. Maybe the problem is that some extra characters such as a BOM are added to the file?
oneguy is offline   Reply With Quote
Users who have thanked oneguy for this post:
Zydeco (08-24-2012)
Old 08-20-2012, 10:08 PM   PM User | #3
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,455
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
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 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote
Users who have thanked rnd me for this post:
Zydeco (08-24-2012)
Old 08-21-2012, 12:39 AM   PM User | #4
Zydeco
New to the CF scene

 
Join Date: Aug 2012
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Zydeco is an unknown quantity at this point
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?
Zydeco is offline   Reply With Quote
Old 08-24-2012, 03:15 PM   PM User | #5
Zydeco
New to the CF scene

 
Join Date: Aug 2012
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Zydeco is an unknown quantity at this point
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!
Zydeco is offline   Reply With Quote
Reply

Bookmarks

Tags
annoying, json, problem

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:15 AM.


Advertisement
Log in to turn off these ads.