UnknownKey

class UnknownKey(val path: String, val suggestion: String? = null) : ConfigError

A key in the YAML map does not correspond to any constructor parameter of the target data class.

Generated during unknown-key detection in Deserializer. When a close match is found via Levenshtein distance, it is included as a suggestion.

Example - a typo in the YAML file:

databse:   # should be "database"
host: localhost

produces: UnknownKey(path = "databse", suggestion = "database")

Since

1.0

Parameters

path

Dot-separated field path of the unrecognised key.

suggestion

Closest valid key name, or null if no match is within the distance threshold.

See also

Constructors

Link copied to clipboard
constructor(path: String, suggestion: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val suggestion: String? = null