Class ContextSetJsonSerializer

java.lang.Object
me.lucko.luckperms.common.context.serializer.ContextSetJsonSerializer

public final class ContextSetJsonSerializer extends Object
Serializes and deserializes ContextSets to and from JSON.

The entries within the serialized output are sorted, this ensures that any two invocations of serialize(ContextSet) with the same ContextSet will produce the same exact JSON string.

  • Method Details

    • serialize

      public static com.google.gson.JsonObject serialize(net.luckperms.api.context.ContextSet contextSet)
    • deserialize

      public static net.luckperms.api.context.ContextSet deserialize(com.google.gson.Gson gson, String input)
    • deserialize

      public static net.luckperms.api.context.ContextSet deserialize(com.google.gson.JsonElement element)