Back to JsonResponse class

Method __toString

public string
__toString
()
Magic toString method for sending the response in JSON format
Returns
  • string The response in JSON format
Since
  • 3.1
Class: JsonResponse
Project: Joomla

Method __toString - Source code

/**
 * Magic toString method for sending the response in JSON format
 *
 * @return  string  The response in JSON format
 *
 * @since   3.1
 */
public function __toString()
{
    return json_encode($this);
}