public static Inventory deserializeInventory(JsonElement data, String title) {
        Preconditions.checkArgument(data.isJsonPrimitive());
        return InventorySerialization.decodeInventory(data.getAsString(), title);
    }
Utility methods for converting ItemStacks and Inventories to and from JSON.
helper/src/main/java/me/lucko/helper/serialize/Serializers.java