encodeTileToJsonElement

fun encodeTileToJsonElement(tile: TileSchema): JsonElement

Encodes tile to a JsonElement, resolving its serializer from its own runtime class — the mechanism TileHolder.update uses to encode a tile's current state before merging a JSON patch onto it, without the generic TileHolder<T> needing to know T's concrete serializer ahead of time.