def decode_to_unicode(data):
    """Recursively decodes byte strings to unicode"""
    if isinstance(data, bytes):
        return data.decode('utf-8')
    elif isinstance(data, dict):
        return dict((decode_to_unicode(k), decode_to_unicode(v))
            for k, v in data.items())
    elif isinstance(data, list):
        return [decode_to_unicode(e) for e in data]
    return data