If you are encoding PHP objects by default the encoding mechanism
can only access public properties of these objects. When a method
toJson() is implemented on an object to encode,
Zend_Json calls this method and expects the object to return a
JSON representation of its internal state.




