[ 
https://issues.apache.org/jira/browse/SHINDIG-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747983#action_12747983
 ] 

Paul Lindner commented on SHINDIG-1148:
---------------------------------------

safari 4.0.2 does not seem to have window.JSON at all.  Not sure about Opera.

Is it possible that another library is creating a window.JSON var?

> gadgets.rpc.call fails on Safari and Opera
> ------------------------------------------
>
>                 Key: SHINDIG-1148
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1148
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>         Environment: MacOSX, Safari 4.0.2 and Opera 9.62
>            Reporter: nov matake
>
> At least Safari 4.0.2 and Opera don't have window.JSON.parse, though they 
> have window.JSON
> Shindig trunk's json.js in core feature require it, therefore all 
> gadget.rpc.call is failing on those browser.
> This patch fix it.
> ==
> From b8f52eb07cfea12d6c6353a9f345a4fb779e8ab0 Mon Sep 17 00:00:00 2001
> From: nov matake <[email protected]>
> Date: Thu, 6 Aug 2009 22:17:38 +0900
> Subject: [PATCH] fixed features/core/json.js
> At least Safari 4.0.2 and Opera don't have window.JSON.parse, though they 
> have window.JSON
> ---
>  features/src/main/javascript/features/core/json.js |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> diff --git a/features/src/main/javascript/features/core/json.js 
> b/features/src/main/javascript/features/core/json.js
> index 03c6bc1..a62afcc 100644
> --- a/features/src/main/javascript/features/core/json.js
> +++ b/features/src/main/javascript/features/core/json.js
> @@ -40,7 +40,7 @@ var gadgets = gadgets || {};
>   * Port of the public domain JSON library by Douglas Crockford.
>   * See: http://www.json.org/json2.js
>   */
> -if (window.JSON) {
> +if (window.JSON && window.JSON.parse) {
>    // HTML5 implementation, or already defined.
>    // Not a direct alias as the opensocial specification disagrees with the 
> HTML5 JSON spec.
>    // JSON says to throw on parse errors and to support filtering functions. 
> OS does not.
> -- 
> 1.6.3.3

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to