getDiscriminatorPropertyName

fun getDiscriminatorPropertyName(simpleName: String, qualifiedName: String?, annotationArguments: List<Pair<String, Any?>>): String?(source)

Extracts the discriminator property-name override from an annotation if it matches a recognised discriminator annotation (e.g., @JsonClassDiscriminator).

Simple annotation names are matched case-insensitively; fully qualified names are matched case-sensitively (exact match).

Return

The discriminator property name if found, or null if the annotation is not recognized or contains no matching parameter

Parameters

simpleName

The simple name of the annotation (e.g., "JsonClassDiscriminator")

qualifiedName

The fully qualified name of the annotation (e.g., "kotlinx.serialization.json.JsonClassDiscriminator"), or null if unavailable

annotationArguments

List of key-value pairs representing the annotation's parameters