def checkArrivedJSON():
    for filename in sorted(os.listdir(pathToJSON)):
        if filename.endswith('.json'):
            username = filename.strip('.json')
            json_timestamp_epoch = get_local_json_timestamp_epoch(username, filename)
            if (json_timestamp_epoch == None):
                continue
            json_timestamp_epochRemote = get_remote_json_timestamp_epoch(username)
            if (json_timestamp_epoch > json_timestamp_epochRemote):
                monitoredJSON = json.load(open(((pathToJSON + os.sep) + filename), 'r+'))
                monitoredJSON = str(monitoredJSON)
                manageMonitoredUsersDB.update_monitoredUserByName(username, monitoredJSON)
def checkArrivedJSON():
    for filename in sorted(os.listdir(pathToJSON)):
        if filename.endswith('.json'):
            username = filename.strip('.json')
            json_timestamp_epoch = get_local_json_timestamp_epoch(username, filename)
            if (json_timestamp_epoch == None):
                continue
            json_timestamp_epochRemote = get_remote_json_timestamp_epoch(username)
            if (json_timestamp_epoch > json_timestamp_epochRemote):
                monitoredJSON = json.load(open(((pathToJSON + os.sep) + filename), 'r+'))
                monitoredJSON = str(monitoredJSON)
                manageMonitoredUsersDB.update_monitoredUserByName(username, monitoredJSON)