-fun jsonObject(vararg properties: Pair<String, String>) = jsonObject {
- properties.forEach { put(it.first, it.second) }
+
+fun jsonObject(vararg properties: Pair<String, Any?>) = jsonObject {
+ properties.forEach {
+ it.second.let { value ->
+ when (value) {
+ is String -> put(it.first, value)
+ is Int -> put(it.first, value)
+ is Long -> put(it.first, value)
+ is Boolean -> put(it.first, value)
+ else -> Unit
+ }
+ }
+ }