stripClassDiscriminator

fun JsonElement.stripClassDiscriminator(discriminator: String = "kind"): JsonElement

Recursively strips the class discriminator field from all JsonObject nodes.

Used to remove the "kind" field that kotlinx.serialization adds for polymorphic types, keeping the JSON output clean for disk records and cluster progress logs.