Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 2    Views: 260

Jen
Lost but trying
Profile
Posts: 70
Reg: Mar 14, 2013
Melbourne
2,750
04/23/14 06:32 PM (9 years ago)

How to safely delete a line in JSON

Hi, I have an odd thing happening inside my App. A background screen that I used before the upgrade no longer appears/stays on the desired page (the Circle View List plugin). I've replaced it with another background, so I'm not concerned about trying to chase that down. My main issue is that the background (seen below as "Night-sky-milky-way-galaxy-astrophotography_-_West_Virginia_-_ForestWander.png") flashes on the screen before it transitions to the background in place. I figure the best way to resolve this is to delete it from JSON, but I am not a coder and am VERY worried about messing around in this area. Can someone have a look at the excerpt below and let me know from where to where I can delete? Thanks heaps, Jen "BT_screens":[{"itemId":"3B7BDFB1DC848F35EF04406", "itemType":"Cr_menu_advanced", "itemNickname":"Get Reviewed advanced menu", "itemId":"3B7BDFB1DC848F35EF04406", "itemType":"Cr_menu_advanced", "itemNickname":"Get Reviewed advanced menu", "navBarTitleText":"Get Your App Reviewed", "navBarBackgroundColor":"#00CC66", "navBarStyle":"solid", "backgroundColor":"#000000", "backgroundImageURLSmallDevice":"https://www.buzztouch.com/applications032613/JA5033360DDDAA0E85DC89B88/images/Night-sky-milky-way-galaxy-astrophotography_-_West_Virginia_-_ForestWander.png", "backgroundImageURLLargeDevice":"https://www.buzztouch.com/applications032613/JA5033360DDDAA0E85DC89B88/images/Night-sky-milky-way-galaxy-astrophotography_-_West_Virginia_-_ForestWander.png", "backgroundImageScale":"fullScreen",
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/23/14 08:49 PM (9 years ago)
Well, the json you provide isn't valid json, so even if I return something, I'll return something incomplete and subject to further errors. Sorry about that. Json is incredibly simple, yet incredibly complex at the same time… If you can get a 'feel' for the order of things, it's not too hard to see what's going on. I'll say that 'jsonlint.com' is not only in my bookmarks, it's on my toolbar. I use it constantly. Not only does it 'validate' your json, but it also formats it in a very pretty 'easier' to understand layout separating the objects. If you need to remove a json 'value', be sure to get both the 'key' and the 'value'. "myKey": "myValue" (also remove a comma, if the key/value is in the middle of an object) there is a fairly good write up on all of it here: http://www.json.com And for what it's worth, you have duplicated itemId's, itemType's and itemNicknames in the above example: "BT_screens":[ {"itemId":"3B7BDFB1DC848F35EF04406", "itemType":"Cr_menu_advanced", "itemNickname":"GetReviewedadvancedmenu", "itemId":"3B7BDFB1DC848F35EF04406", "itemType":"Cr_menu_advanced", "itemNickname":"GetReviewedadvancedmenu", "navBarTitleText":"GetYourAppReviewed", "navBarBackgroundColor":"#00CC66", "navBarStyle":"solid", "backgroundColor":"#000000", "backgroundImageURLSmallDevice":"https: //www.buzztouch.com/applications032613/JA5033360DDDAA0E85DC89B88/images/Night-sky-milky-way-galaxy-astrophotography_-_West_Virginia_-_ForestWander.png", "backgroundImageURLLargeDevice":"https: //www.buzztouch.com/applications032613/JA5033360DDDAA0E85DC89B88/images/Night-sky-milky-way-galaxy-astrophotography_-_West_Virginia_-_ForestWander.png", "backgroundImageScale":"fullScreen", incompleteness notwithstanding, you'll want to remove the duplicates: "BT_screens":[ {"itemId":"3B7BDFB1DC848F35EF04406", "itemType":"Cr_menu_advanced", "itemNickname":"GetReviewedadvancedmenu", "navBarTitleText":"GetYourAppReviewed", "navBarBackgroundColor":"#00CC66", "navBarStyle":"solid", "backgroundColor":"#000000", "backgroundImageURLSmallDevice":"https: //www.buzztouch.com/applications032613/JA5033360DDDAA0E85DC89B88/images/Night-sky-milky-way-galaxy-astrophotography_-_West_Virginia_-_ForestWander.png", "backgroundImageURLLargeDevice":"https: //www.buzztouch.com/applications032613/JA5033360DDDAA0E85DC89B88/images/Night-sky-milky-way-galaxy-astrophotography_-_West_Virginia_-_ForestWander.png", "backgroundImageScale":"fullScreen", Hope this helps! Cheers! -- Smug
 
Jen
Lost but trying
Profile
Posts: 70
Reg: Mar 14, 2013
Melbourne
2,750
like
04/23/14 10:30 PM (9 years ago)
Thanks. I'll have a look and hopefully won't screw things up. :)
 

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.