You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by bh...@apache.org on 2010/09/21 15:17:41 UTC
svn commit: r999398 -
/shindig/trunk/features/src/main/javascript/features/core.json/json.js
Author: bhofmann
Date: Tue Sep 21 13:17:41 2010
New Revision: 999398
URL: http://svn.apache.org/viewvc?rev=999398&view=rev
Log:
Fix: gadgets.json.stringify generates invalid and unparsable string if a value in an object is undefined
Modified:
shindig/trunk/features/src/main/javascript/features/core.json/json.js
Modified: shindig/trunk/features/src/main/javascript/features/core.json/json.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.json/json.js?rev=999398&r1=999397&r2=999398&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/core.json/json.js (original)
+++ shindig/trunk/features/src/main/javascript/features/core.json/json.js Tue Sep 21 13:17:41 2010
@@ -175,7 +175,7 @@ if (window.JSON && window.JSON.parse &&
// Join all of the member texts together and wrap them in braces.
return '{' + a.join(',') + '}';
}
- return 'undefined';
+ return '';
}
return {
Re: svn commit: r999398 - /shindig/trunk/features/src/main/javascript/features/core.json/json.js
Posted by Paul Lindner <li...@inuus.com>.
We might want to make a test to insure that core.json mimics the window.JSON
behavior in the browser...
On Tue, Sep 21, 2010 at 6:17 AM, <bh...@apache.org> wrote:
> Author: bhofmann
> Date: Tue Sep 21 13:17:41 2010
> New Revision: 999398
>
> URL: http://svn.apache.org/viewvc?rev=999398&view=rev
> Log:
> Fix: gadgets.json.stringify generates invalid and unparsable string if a
> value in an object is undefined
>
>
> Modified:
> shindig/trunk/features/src/main/javascript/features/core.json/json.js
>
> Modified:
> shindig/trunk/features/src/main/javascript/features/core.json/json.js
> URL:
> http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.json/json.js?rev=999398&r1=999397&r2=999398&view=diff
>
> ==============================================================================
> --- shindig/trunk/features/src/main/javascript/features/core.json/json.js
> (original)
> +++ shindig/trunk/features/src/main/javascript/features/core.json/json.js
> Tue Sep 21 13:17:41 2010
> @@ -175,7 +175,7 @@ if (window.JSON && window.JSON.parse &&
> // Join all of the member texts together and wrap them in braces.
> return '{' + a.join(',') + '}';
> }
> - return 'undefined';
> + return '';
> }
>
> return {
>
>
>
--
Paul Lindner -- lindner@inuus.com -- linkedin.com/in/plindner