public static function toJson($data, $options = array())
    {
        // Merge options with defaults
        $defaults = array('hide' => array('password'));
        $options = array_merge($defaults, $options);

        // Convert the data to an array, if possible..
        if (!is_array($data)) {
            $data = Arr::convert($data);
        }

        foreach ($data as $k => $v) {
            $data[$k] = Arr::convert($v);
        }

        // Remove the parts we don't want...
        if (isset($options['hide']) and is_array($data)) {
            $data = Arr::removeKeys($data, $options['hide']);
        }

        return json_encode($data);
    }