public void load() {
        Path file = this.configuration.getPlugin().getBootstrap().getDataDirectory().resolve("contexts.json");
        if (!Files.exists(file)) {
            save();
            return;
        }

        try (BufferedReader reader = Files.newBufferedReader(file, StandardCharsets.UTF_8)) {
            JsonObject data = GsonProvider.normal().fromJson(reader, JsonObject.class);
            if (data == null) {
                return;
            }

            if (data.has("static-contexts")) {
                this.staticContexts = ContextSetJsonSerializer.deserialize(data.get("static-contexts").getAsJsonObject()).immutableCopy();
            }

            if (data.has("default-contexts")) {
                this.defaultContexts = ContextSetJsonSerializer.deserialize(data.get("default-contexts").getAsJsonObject()).immutableCopy();
            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
A wrapper for the 'contexts.json' file.
common/src/main/java/me/lucko/luckperms/common/config/ContextsFile.java