Diabl0,Heh, i don't even have comment rights on issue tracker so here is my answer:
Could you please take a look at ticket
http://framework.zend.com/issues/browse/ZF-4437
and provide your feedback.
Example code:
$data = array ();
for($i = 1; $i < 10; $i ++) {
$data [] = rand ( 0, 10 ) / rand ( 2, 9 );
}
echo '<pre>'; var_dump ( $data ); echo '</pre>';
echo '<pre>ZJE::e '; print_r ( Zend_Json_Encoder::encode ( $data ) ); echo '</pre>';
echo '<pre>ZE::e '; print_r ( Zend_Json::encode ( $data ) ); echo '</pre>';
Example output:
array(9) { [0]=> int(1) [1]=> float(0,5) [2]=> float(0,888888888889) [3]=> int(1) [4]=> float(0,857142857143) [5]=> float(1,66666666667) [6]=> int(2) [7]=> float(0,125) [8]=> int(3) }
ZJE::e [1,0,5,0,888888888889,1,0,857142857143,1,66666666667,2,0,125,3]
ZE::e [1,0.5,0.888888888889,1,0.857142857143,1.66666666667,2,0.125,3]
So, as you can see problem is somewhere in Zend_Json_Encoder.
--
Krzysztof Szatanik
没有评论:
发表评论