The Problem This may be news to some, but json_encode() respects property visibility. Meaning that if you have a class that looks like this... class Thing { public $something; protected $protected_something; private $private_something; public __construct($pub, $prot, $priv) { $this->something = $pub;