public function json_encode_recursion($object, $recursionLevel = 1, $options = 0){
        $objects= array();
        $ocurrencias= array();
        $array= array();
        if(is_array($object)){
            $array= $object;
            foreach ($array as &$var) {
                $var= $this->json_encode_recursion_internal($var, $recursionLevel, $options, $objects, $ocurrencias);
            }
        }else{        
            $array= $this->json_encode_recursion_internal($object, $recursionLevel, $options, $objects, $ocurrencias);
        }
        return json_encode($array, $options);
    }