How to PHP class instance to JSON?
<?php
class Book implements JsonSerializable{
private $id;
private $title;
private $author;
function __construct($_id,$_title,$_author){
$this->id=$_id;
$this->title=$_title;
$this->author=$_author;
}
public function jsonSerialize()
{
return get_object_var...