[Developers] JSON.stringify problem on Acre

Dominiek ter Heide dominiek at smart.fm
Thu Jul 2 09:55:22 UTC 2009


Hi Guys,

I just bumped into a nasty little JSON problem. When doing this MQL  
query, there is an anomaly in the country result for Iran:

query:

[
      {
        "type": "/location/country",
        "name": null,
        "/common/topic/image": {
           "id": null,
           "limit": 1,
           "optional": false
         },
        "*": null,
        "limit": 6
      }
    ];


result:

       "iso3166_1_alpha2": "IR",
       "iso3166_1_shortname": [
         "\"IRAN, ISLAMIC REPUBLIC OF\""
       ],
       "iso_alpha_3": [
         "IRN"
       ],


When passing this through the server-side JSON.stringify it results in  
an invalid JSON string (browser doesn't want to do JSONP):

             "iso3166_1_shortname": [
                 ""IRAN,
                 ISLAMIC REPUBLIC OF ""
             ],

Trying to find a quick workaround now.

Best Regards,

Dominiek ter Heide




More information about the Developers mailing list