fieldsToMap

inline fun <T : Any> T.fieldsToMap(clazz: KClass<*>): MutableMap<String, String>

Uses reflection to access all fields of type clazz in T and write field name and its value as a key-value pair into a map.