import json


def op_from_json(json_data):
    """
    Convert an operation from a JSON string
    to an operation object.

    Parameters
    ----------
    json_data: the JSON string

    Returns
    ----------
    op: the operation object

    """
    data = json.loads(json_data)
    op = globals()[data['SubopType']](data['column_name'])
    op.input_type, op.output_type = data['iotype']
    op.hyper_parameter_settings = data['hyper_parameter_settings']
    return op