import json


def str_to_obj(string):
    """
    Converts JSON string to data structure

    Args:
        string (str): valid JSON string

    Raises:
        ValueError: if input isnt a valid JSON string

    Returns:
        Data structure: [description]
    """ 
    try:
        return json.loads(string)
    except ValueError as e:
        raise ValueError("ValueError occured when loading JSON string: {}, the input was: {}".format(e, string))