PHP: Converting __toString when calling json_encode using JsonSerializable interface
JsonSerializable { /* Methods */ abstract public mixed jsonSerialize ( void ) } When calling a json_encode on an object: See: http://stackoverflow.com/questions/401908/php-tostring-and-json-encode-not-playing-well-together And: http://php.net/manual/en/class.jsonserializable.php