ZF-4874: Unable to properly encode an ArrayIterator using Zend_Json_Encoder

Description


$ar = new ArrayIterator();
$ar->append('foo');

echo Zend_Json_Encoder::encode($ar);

// Results in {"__className":"ArrayIterator"}

This should be:


{"0":"foo"}

json_encode() gives the expected result

Comments

Resolved in revision 12580