public static ContextSet deserialize(Gson gson, String input) {
        Objects.requireNonNull(input, "input");
        if (input.equals("{}")) {
            return ImmutableContextSetImpl.EMPTY;
        }

        JsonObject jsonObject = gson.fromJson(input, JsonObject.class);
        if (jsonObject == null) {
            return ImmutableContextSetImpl.EMPTY;
        }

        return deserialize(jsonObject);
    }
Serializes and deserializes {@link ContextSet}s to and from JSON.

<p>The entries within the serialized output are sorted, this ensures that any two invocations
of {@link #serialize(ContextSet)} with the same {@link ContextSet} will produce
the same exact JSON string.</p>
common/src/main/java/me/lucko/luckperms/common/context/serializer/ContextSetJsonSerializer.java