server/api_class.py
def check_incorrect_format(self, url: str) -> bool:
        ''' checks to see if the json file is in incorrect format '''
        
        response = None
        
        try:
            request = urllib.request.Request(url)
            response = urllib.request.urlopen(request)
            json_text = response.read().decode(encoding = 'utf-8')

            # checks to see if json is empty
            if not json_text:
                return True
            else:
                return False
        except:
            return True
        
        finally:
            if response != None:
                response.close()
 checks to see if the json file is in incorrect format 
checks to see if the json file is in incorrect format
checks to see if the json file is in incorrect format
def check_incorrect_format(self, url: str) -> bool:
        response = None
        try:
            request = urllib.request.Request(url)
            response = urllib.request.urlopen(request)
            json_text = response.read().decode(encoding = 'utf-8')
            if not json_text:
                return True
            else:
                return False
        except:
            return True
        finally:
            if response != None:
                response.close()
def check_incorrect_format ( self , url : str ) -> bool : response = None try : request = urllib . request . Request ( url ) response = urllib . request . urlopen ( request ) json_text = response . read ( ) . decode ( encoding = 'utf-8' ) if not json_text : return True else : return False except : return True finally : if response != None : response . close ( )
checks to see if the json file is in incorrect format
checks to see if the json file is in incorrect format
''' checks to see if the json file is in incorrect format ''' # checks to see if json is empty
self
url
str