toMap

fun Any.toMap(defaultOverrides: Map<String, Any> = emptyMap()): Map<String, Any?>(source)

Converts an object to a map of property names and values, overriding any values with the same key with the fallback map.