writeErased
Writes an object to a channel identified by name, inferring the schema from the object's runtime class.
Use this when the channel type isn't known at compile time. If the channel doesn't exist, this creates it from the object's class first.
Java sees this as write. It is named writeErased in Kotlin so it doesn't clash with the reified write extension, which Kotlin callers should use because it also recovers type arguments. A runtime class has no type arguments, so this rejects a Map or Collection. Create the channel with an explicit schema instead, for example createChannel("k", new MapSchema<>(StringSchema.INSTANCE, DoubleSchema.INSTANCE)).
The cast to the existing channel's type is unchecked. Writing the wrong type to an existing channel fails at encode time, not compile time. Prefer the typed write where you can.
Parameters
The name of the channel to write to
The object to write