Reviewers: Ray Ryan, bobv, Description: This patch adds: - JsonUtils.safeParse - JsonUtils.stringify - JsonUtils.isArray (equivalent of ECMAScript 5's Array.isArray) - deferred binding implementations using either native support or emulation (eval() for the parsing)
ExternalTextResourcePrototype now uses JsonUtils.safeParse. This patch unfortunately introduces a circular dependency between c.g.g.core.Core and c.g.g.json.JSON to emulate JSON.stringify(); I believe JSONValues should use JsonUtils.stringify (adding overloads eventually) instead of JsonUtilsImplEmulated depending on JSONObject/JSONArray.toString, but it would require a major rewrite of the whole c.g.g.json.JSON module. I'm using a similar code (as an "extension", not as a "patch") at work with no problem so far. Please review this at http://gwt-code-reviews.appspot.com/86803 Affected files: user/src/com/google/gwt/core/Core.gwt.xml user/src/com/google/gwt/core/JsonUtils.gwt.xml user/src/com/google/gwt/core/client/JsonUtils.java user/src/com/google/gwt/core/client/impl/JsonUtilsImpl.java user/src/com/google/gwt/core/client/impl/JsonUtilsImplEmulated.java user/src/com/google/gwt/core/client/impl/JsonUtilsImplFallback.java user/src/com/google/gwt/core/client/impl/JsonUtilsImplNoArray.java user/src/com/google/gwt/resources/client/impl/ExternalTextResourcePrototype.java --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---