import json


def load_request_data(request_obj):
    """Reads request sent to a client and then loads the json from it."""
    decoded_request_data = request_obj.data.decode().strip()
    if decoded_request_data != "":
        data = json.loads(request_obj.data.decode())
    else:
        data = {}
    return data