def METHOD_NAME(store, path):
    """Save a store to the given path as JSON output."""
    path = Path(path)
    with path.open('w') as f:
        temp_dict = {}
        for name, permissions in store.items():
            node = temp_dict[permissions.name] = {}
            parents = permissions.parents
            if parents:
                # TODO: Except GUEST_PARENT_NAME
                node['parents'] = list(
                    map(lambda parent: parent.name, parents))
            if permissions:
                node['permissions'] = list(permissions)
        json.dump(temp_dict, f, indent=4, sort_keys=True)