public static function correct_types($st){
    if ( \is_string($st) ){
      if ( self::is_buid($st) ){
        $st = bin2hex($st);
      }
      else{
        if ( self::is_json($st) ){
          if ( strpos($st, '": ') && ($json = json_decode($st)) ){
            return json_encode($json);
          }
          return $st;
        }
        $st = trim($st);
        // Not starting with a zero or ending with a zero decimal
        if ( !preg_match('/^0[^.]+|\.[0-9]*0$/', $st) ){
          if ( self::is_integer($st) && ((substr((string)$st, 0, 1) !== '0') || ($st === '0')) ){
            $tmp = (int)$st;
            if ( ($tmp < PHP_INT_MAX) && ($tmp > -PHP_INT_MAX) ){
              return $tmp;
            }
          }
          // If it is a decimal, not starting or ending with a zero
          else if ( self::is_decimal($st) ){
            return (float)$st;
          }
        }
      }
    }
    else if ( \is_array($st) ){
      foreach ( $st as $k => $v ){
        $st[$k] = self::correct_types($v);
      }
    }
    else if ( \is_object($st) ){
      $vs = get_object_vars($st);
      foreach ( $vs as $k => $v ){
        $st->$k = self::correct_types($v);
      }
    }
    return $st;
  }