'JsonSerializable::jsonSerialize()' does not rerurn a string. It returns the value, which should be than encoded to JSON.
It can return array for example.
So the CJSON::encode() signature is broken.

See <a href="http://us.php.net/manual/en/jsonserializable.jsonserialize.php">http://us.php.net/manual/en/jsonserializable.jsonserialize.php</a>