Transform a dictionary of attribute instances into a list of Json
    objects, i.e., list of key-value pairs.

    Parameters
    ----------
    attributes : dict(Attribute)
        Dictionary of attribute instances

    Returns
    -------
    list(dict(name:..., value:...))
        List of key-value pairs.

def attributes_to_dict(attributes):
    """Transform a dictionary of attribute instances into a list of Json
    objects, i.e., list of key-value pairs.

    Parameters
    ----------
    attributes : dict(Attribute)
        Dictionary of attribute instances

    Returns
    -------
    list(dict(name:..., value:...))
        List of key-value pairs.
    """
    result = []
    for key in attributes:
        result.append({
            'name' : key,
            'value' : attributes[key].value
        })
    return result