I'm also voting for removing this extension, it makes qooxdoo-json-rpc incompatible with everything.
On Mon, Jan 18, 2010 at 1:32 PM, Fabian Jakobs <[email protected]> wrote: > Hi, > > Yesterday I've landed a commit, which adds native JSON support to > qooxdoo. There is a new class qx.lang.Json, which has exactly the same > interface as the JSON object defined in the EcmaScript 5 specification > <https://developer.mozilla.org/En/Using_native_JSON>. All new browsers > like Firefox 3.5, Internet Explorer 8, Opera 10.5 or Safari 4 support it > natively. In browsers without native JSON support a modified version of > Douglas Crockford's json2 is used. This is great news because parsing > and serializing JSON is a lot faster on those browsers. > > BUT > > we cannot deprecate the old implementation yet. The qooxdoo JSON > implementation has historically maintained an incompatible JSON > extension to support dates. The idea was let "eval" create the date > instances: > > qx.util.Json.stringify({ date: new Date(123)}) --> {"date":new > Date(Date.UTC(1970,0,1,0,0,0,0))} > > While it probably was a good idea back then, it is a problem now because > we cannot make the browser's JSON object emit or parse this: > > JSON.stringify{ date: new Date(123)} --> {"date":"1970-01-01T00:00:00.000Z"} > > For the server side we have the same problem. If we support this e.g. in > PHP we cannot use PHP's buildin JSON support, which means a severe > performance hit. > > > Since the RPC code is the only code depending on this feature I would > like to know from the RPC authors: > > 1. Wouldn't dates represented as ISO strings be sufficient? Do you think > we need a special date extension? > 2. If we find a standard compliant way to serialize dates, would you > update your backend code? > 3. Do you think everything is fine and we should just keep both JSON > implementations? > > I'm really interested in your feedback, > > Best Fabian > > -- > Fabian Jakobs > JavaScript Framework Developer > > 1&1 Internet AG - Web Technologies > Ernst-Frey-Straße 9 · DE-76135 Karlsruhe > Telefon: +49 721 91374-6784 > [email protected] > > Amtsgericht Montabaur / HRB 6484 > Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas > Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver > Mauss, Jan Oetjen > Aufsichtsratsvorsitzender: Michael Scheeren > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > -- Best regards - Petr Kobalicek <http://kobalicek.com> ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
