fun mapToString(map: Map<String, String>): String {
val arrayOfMapEntries = map.entries.map { entry ->
entry.key + "=" + entry.value
}
return arrayOfMapEntries.joinToString(",")
}
fun stringToMap(s: String): Map<String, String> {
val map = s.split(",").associate {
val (left, right) = it.split("=")
left to right
}
return map
}