FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
12/16/15 03:34 AM (8 years ago)

Advice from the gurus.

Hi guys, could you point me in the right direction, im getting (there was aproblem parsing some jason) checked the jason, all fine, happens when i open a menu plus screen, I think the error is here. AMG_ButtonPlus: ERROR parsing JSON: ( "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 "Unrecognised leading character" UserInfo={NSLocalizedDescription=Unrecognised leading character}" ) I have checked the jason in the screens, cant see where the error is, the jason from the screen is here. { "itemId": "7A2CE716E66F9D12EAA09C9", "itemType": "AMG_ButtonPlus", "itemNickname": "£15 Meat Pack new", "navBarTitleText": "£15 Meat Pack", "dataURL": "https://www.webmonkeys.co/martonmeats.htm", "buttonAutoLsizeSmallDevice": "4", "buttonVTweakSmallDevice": "-3", "buttonAutoLsizeLargeDevice": "4", "buttonVTweakLargeDevice": "-3", "buttonLayoutStyle": "horizontalBottom", "buttonLabelFontColor": "clear", "preventAllScrolling": "1", "backgroundImageNameSmallDevice": "meatpack15new.jpg", "backgroundImageNameLargeDevice": "meatpack15new.jpg", "backgroundImageScale": "fullScreen" } What am i doing wrong please . Thanks Sean
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/16/15 04:03 AM (8 years ago)
Hafa Adai Sean! Do it by process of elimination/ Remove all of the json except: { "itemId": "7A2CE716E66F9D12EAA09C9", "itemType": "AMG_ButtonPlus", "itemNickname": "£15 Meat Pack new", "navBarTitleText": "£15 Meat Pack" } and see if it works. If it does, then add each line until you come across an error. (if it doesn't, remove the pound sign and see if it works) But be sure to add/remove commas as needed when you add the lines it; keep it json compliant. I suspect an odd character, but they all seem good. I've seen a few thing sneak through json lint before, where the 'format' was json compliant, but a 'character' threw a wrench in the machine. This may also be one of those times. "dataURL": "https://www.webmonkeys.co/martonmeats.htm", "buttonAutoLsizeSmallDevice": "4", "buttonVTweakSmallDevice": "-3", "buttonAutoLsizeLargeDevice": "4", "buttonVTweakLargeDevice": "-3", "buttonLayoutStyle": "horizontalBottom", "buttonLabelFontColor": "clear", "preventAllScrolling": "1", "backgroundImageNameSmallDevice": "meatpack15new.jpg", "backgroundImageNameLargeDevice": "meatpack15new.jpg", "backgroundImageScale": "fullScreen" <-- only remove comma from last line; all other lines need commas. Also, check to make sure that any 'required' options are available in the plugin, if present. Sometimes 'not' having specified an option can cause an error, depending on the plugin requirements... Cheers! -- Smug
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/16/15 04:37 AM (8 years ago)
>https://www.webmonkeys.co/martonmeats.htm The page is there if you remove the "s": http://www.webmonkeys.co/martonmeats.htm Maybe this is the error, check it out.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
12/16/15 05:24 AM (8 years ago)
thanks smug I will remove and test, i did a bit of that before i posted, ie removed pound sign and soo on, i will do it more thorough now, thanks for the advice smug, (Dusko)I added the s to see if that was it, it wasnt, but well spotted :)
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
12/16/15 08:18 AM (8 years ago)
Cheers Smug Narrowed it down to a line That shouldnt have been there, another of my rookie mistakes, sorry for bothering you dude, Ive learned something Though, Thanks Buddy. Sean
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.