Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 6    Views: 78

jasonr
Aspiring developer
Profile
Posts: 45
Reg: Jan 14, 2013
California, USA
2,750
02/23/13 06:38 AM (11 years ago)

json snippet correct?

I am trying to use the json snippet plugin to control some custom logic (ad rotation in this case). I am not using it to duplicate screens. Here is what I pasted into the snippet keeper plugin: {"itemId":"chartboost", "itemNickname":"chartboost", "displayPercentage":"30"}, {"itemId":"revmob", "itemNickname":"revmob", "displayPercentage":"70"} And this is what shows up in the config file: {"itemId":"538E844CE1FB990FDB686CF", "itemType":"Json_snippet_keeper", "itemNickname":"ad networks", "itemId":"chartboost", "itemNickname":"chartboost", "displayPercentage":"30"}, {"itemId":"538E844CE1FB990FDB686CF", "itemType":"Json_snippet_keeper", "itemNickname":"ad networks", "itemId":"revmob", "itemNickname":"revmob", "displayPercentage":"70"}, See the itemId that the json plugin inserts is not unique? I thought these items would be nested under one json snippet keeper? What am I doing wrong? Thanks a lot!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/23/13 02:21 PM (11 years ago)
That would be a 'Stobe' question... But I think the 'generated' itemId is the Json Snippet keeper's itemId. He can explain better though... Cheers! -- Smug
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
02/25/13 12:20 PM (11 years ago)
Jasonr: did you delete out the default itemID before pasting your text in the snippet box? I just tested your above lines (in a project hosted here at BT, not self-hosted), and it showed up in the main config.txt exactly as pasted. I did not have any itemType, itemNickname, etc in my config. -Stobe
 
jasonr
Aspiring developer
Profile
Posts: 45
Reg: Jan 14, 2013
California, USA
2,750
like
02/25/13 01:10 PM (11 years ago)
OK, so this time I removed fields itemId & itemNickname in what I paste into the json plugin: { "name": "none", "displayPercentage": "20" }, { "name": "chartboost", "displayPercentage": "30" }, { "name": "revmob", "displayPercentage": "50" } And this is what I see in my config: {"itemId":"538E844CE1FB990FDB686CF", "itemType":"Json_snippet_keeper", "itemNickname":"ad networks", "name": "none", "displayPercentage": "20" }, {"itemId":"538E844CE1FB990FDB686CF", "itemType":"Json_snippet_keeper", "itemNickname":"ad networks", "name": "chartboost", "displayPercentage": "30" }, {"itemId":"538E844CE1FB990FDB686CF", "itemType":"Json_snippet_keeper", "itemNickname":"ad networks", "name": "revmob", "displayPercentage": "50" }
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
02/25/13 01:46 PM (11 years ago)
That's odd. Is this on a self hosted server, or here at buzztouch.com?
 
jasonr
Aspiring developer
Profile
Posts: 45
Reg: Jan 14, 2013
California, USA
2,750
like
02/25/13 01:55 PM (11 years ago)
self hosted.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
02/25/13 02:00 PM (11 years ago)
ok, there might be something wrong with the self hosted version of this plugin. I'll bring this to David's attention. Are you running 2.1.8?
 

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.