Good Morning Jean-Noël,
I just checked that and it seems that the code was written on intension exactly 
how it is. The unit test for that features shows that the custom toJSON should 
return an string without the quotes and the quotes will be added by the 
__convert call, as the key is.
The native json method on the other hand returns the strings as it should be. 
So the question is, should we change it? It would be easy because it seems to 
be a not documented feature, right?
Best,
Martin


Am 29.09.2010 um 19:55 schrieb Jean-Noël Rivasseau:

> Hello
> 
> It seems to me there is a bug in __convertObject() if the underlying
> object already has a native toJSON implementation. Because in that
> case you do:
> 
> return this.__convert(incoming.toJSON(key), key); (l. 413 in Qx 1.2)
> 
> whereas incoming.toJSON(key) already returns a String. So since it
> will go into __convert again the return String will get extra quotes
> and will be converted - clearly not what we want.
> 
> I tried today not with a native implementation but with Prototype's
> implementation and ran into a bug because of this.
> 
> I think it is sufficient to change the line to:
> 
>                           return incoming.toJSON(key);
> 
> It works in my case anyway. Should I open a bug or someone will
> analyze it and fix it right away?
> 
> PS: I am still waiting for a wiki account to put our application in
> the real life examples. If someone can make me an account that would
> be great.
> 
> -- 
> Jean-Noël Rivasseau
> Directeur
> (1) 778 786 3460 / (33) 01 82 88 05 26
> Kameleoon - morphing the web
> http://www.kameleoon.com/
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to