Protected and private properties are ignored,
when json_encoding a class instance.
The snippet
<?php
class Example
{
private $privateprop = "private property";
protected $protectedprop = "protected property";
public $publicprop = "public property";
}
echo json_encode(new Example);
?>
only returns
{"publicprop":"public property"}