private function escapeArray($value) {
        if (!is_array($value)) {
            return $this->escape($value);
        }
        foreach ($value as $key => $prop) {
            $value[$key] = $this->escape($prop);
        }
        return $value;
    }