Serialization-based share using kotlinx.serialization. The data is serialized and deserialized using the provided serializer.