in src/main/kotlin/com/intellij/internal/statistic/eventLog/StatisticsEventEscaper.kt [83:96]
fun escapeEventDataValue(value: Any): Any {
return when (value) {
is String -> escapeEventIdOrFieldValue(value)
is List<*> -> value.map { if (it != null) escapeEventDataValue(it) else it }
is Map<*, *> -> {
value.entries.associate { (entryKey, entryValue) ->
val newKey = if (entryKey is String) escapeFieldName(entryKey) else entryKey
val newValue = if (entryValue != null) escapeEventDataValue(entryValue) else entryValue
newKey to newValue
}
}
else -> value
}
}