public static JsonPrimitive serializeItemstacks(ItemStack[] items) {
        return JsonBuilder.primitiveNonNull(InventorySerialization.encodeItemStacksToString(items));
    }
Utility methods for converting ItemStacks and Inventories to and from JSON.
helper/src/main/java/me/lucko/helper/serialize/Serializers.java