My Zend_Json is messing up in encoding an object here. I\'m encoding an associative array which has two elements: Element one is another associative array while element 2 is an
I see only one possible area where NULL may be returned from Encoder.php. I'd begin debugging by doing some var_dumps inside this function in Zend/Json/Encoder.php
protected function _encodeDatum(&$value)
{
$result = 'null';
if (is_int($value) || is_float($value)) {
$result = (string) $value;
$result = str_replace(",", ".", $result);
} elseif (is_string($value)) {
$result = $this->_encodeString($value);
} elseif (is_bool($value)) {
$result = $value ? 'true' : 'false';
}
return $result;
}
I'm not quite sure why you're HTML string would not be recognized as such, but I might try typecasting it prior to encoding.
array('html' => (string) $yourHtmlStr);