private static JObject createJsonPayload(Map<PermissionHolder, List<Node>> holders, Map<Track, List<String>> tracks, Sender sender, String cmdLabel, ImmutableContextSet potentialContexts, LuckPermsPlugin plugin) {
        return new JObject()
                .add("metadata", formMetadata(sender, cmdLabel, plugin.getBootstrap().getVersion()))
                .add("permissionHolders", new JArray().consume(arr ->
                        holders.forEach((holder, data) ->
                                arr.add(formPermissionHolder(holder, data))
                        )
                ))
                .add("tracks", new JArray().consume(arr ->
                        tracks.forEach((track, data) ->
                                arr.add(formTrack(track, data))
                        )
                ))
                .add("knownPermissions", new JArray().addAll(plugin.getPermissionRegistry().rootAsList()))
                .add("potentialContexts", ContextSetJsonSerializer.serialize(potentialContexts));
    }
Generates a web editor request payload.

@param holders the holders to edit
@param tracks the tracks to edit
@param sender the sender who is creating the session
@param cmdLabel the command label used by LuckPerms
@param plugin the plugin
@return a payload
common/src/main/java/me/lucko/luckperms/common/webeditor/WebEditorRequest.java