Parse a RADL document in JSON.

    Args.:
    - data(str or list): document to parse.

    Return(RADL): RADL object.

def parse_radl(data):
    """
    Parse a RADL document in JSON.

    Args.:
    - data(str or list): document to parse.

    Return(RADL): RADL object.
    """
    if not isinstance(data, list):
        if os.path.isfile(data):
            f = open(data)
            data = "".join(f.readlines())
            f.close()
        data = json.loads(data)
    data = encode_simple(data)
    res = RADL()
    for aspect in [p_aspect(a) for a in data]:
        res.add(aspect)
    return res