[Developers] JSON.stringify problem on Acre

Dominiek ter Heide dominiek at smart.fm
Thu Jul 2 10:09:05 UTC 2009


Actually, I think something else was going on - my Textmate somehow  
reformatted it to the output below.

My apologies.


On 2009/07/02, at 18:55, Dominiek ter Heide wrote:

> 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