scroogepro / open-video-ads

Automatically exported from code.google.com/p/open-video-ads
0 stars 0 forks source link

Ampersand in OpenX "targeting" parameters breaks JSON parser #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following config breaks the JSON parser:

              "servers": [
                   {
                      "type": "OpenX",
                      "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php",
                      "customProperties": {
                            "target": "category=food&gender=male" 
                      }
                   }
              ],

The & is the problem

Original issue reported on code.google.com by paul.sch...@gmail.com on 30 Nov 2009 at 8:20

GoogleCodeExporter commented 9 years ago
Resolved.

Config for multiple parameters to be separated with a & is now as follows:

              "servers": [
                   {
                      "type": "OpenX",
                      "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php",
                      "customProperties": {
                            "target": [ "category=food", "gender=male" ] 
                      }
                   }
              ],

Results in a call such as:

Loading VAST data from OpenX - request is 
http://openx.openvideoads.org/openx/www/delivery/fc.php?
script=bannerTypeHtml:vastInlineBannerTypeHtml:vastInlineHtml&zones=pre-roll0-
0%3D5&nz=1&source=&r=R0.9446986243128777&block=1&format=vast&charset=UTF_8&categ
ory=food&g
ender=male

See example 20

Original comment by paul.sch...@gmail.com on 30 Nov 2009 at 8:39