def smart_parse(body):
    """
    Handle json, fall back to x-www-form-urlencoded
    """
    try:
        data_dict = json.loads(body)
    except __HOLE__:
        return form_urlencoded_parse(body)
    return data_dict
dataset/ETHPy150Open sihrc/tornado-boilerplate/indico/utils/__init__.py/smart_parse