Closed GoogleCodeExporter closed 8 years ago
Confirmed. Fortunately TJSON is used only when json_encode() is not available,
and that seems to act correctly. By the way prado trunk's minimum php version
is actually 5.2, and json_encode() should be enabled by default since that
version, even if it was broken for utf8 up to 5.2.7.
Your proposed patch look ok but changes two behaviours:
- the first you noticed is the 6-decimals limit;
- the second is that it transforms 'E notation' in a plain float number;
I've attached a small testcase adding another possible solution.. let me know
your thoughts about it
Original comment by ctrlal...@gmail.com
on 14 Jan 2012 at 11:15
Attachments:
Since i did not receive any feedback, i've committed the patch as r3095. As
previously noticed, since prado 3.2 requires php 5.2, TJSON should not be
needed anymore, but it's provided just for backwards compatibility.
Original comment by ctrlal...@gmail.com
on 25 Jan 2012 at 8:35
The TJsonService is still explicitly instantiating the TJSON class and using
it's encode() method. I'm not sure whether this is neccessary or
TJavaScript::jsonEncode() could do the same job there (which in turn would call
json_encode() if available), but in its current implementation is surely
effected by this bug.
Original comment by google...@pcforum.hu
on 25 Jan 2012 at 8:51
I've committed r3097 that makes TJsonService use TJavaScript::jsonEncode().
Original comment by ctrlal...@gmail.com
on 25 Jan 2012 at 10:09
Original issue reported on code.google.com by
google...@pcforum.hu
on 14 Jan 2012 at 12:05