2009年6月8日星期一

[fw-mvc] Re: Zend_Json::encode on an array of objects with toJson method

Seems this bug report is refering to the same thing
http://zendframework.com/issues/browse/ZF-5974

On Mon, Jun 8, 2009 at 5:50 PM, Abraham Block <atblock@gmail.com> wrote:
If I wanted to expose private or protected members with Zend_Json::encode, I would implement a toJson method. But if I had an array of these objects, Zend_Json::encode only works on the array itself, but doesn't bother calling the toJson method of any of the items in that array. Is that intended behaviour, or is there a workaround for this?

没有评论: