import logging


def validate_getConfig_body(rdata):
    """
    Method validate getConfig's body for right structure and not empty, rdata = { "data": [...] }
    INPUTS: rdata as dict(body)
    OUTPUT: Returns boolean, True when structure is valid, False when structure is invalid.
    """     
    if isinstance(rdata, dict) is False:
        logging.error("<JSON Body Error: boby passed is not a dictionary...>")
        return False
    elif "data" not in rdata:
        logging.error("<JSON Body Error: 'data' key is missing...>")
        return False
    elif isinstance(rdata["data"], list) is False:
        logging.error("<JSON Body Error: 'data' value is not a list...>")
        return False
    elif not rdata["data"]:
        logging.error("<JSON Body Error: 'data' is empty...>")
        return False
    else:
        return True