[API/Vulcan] Fix wrong serializing of null in JSON causing API error.

This commit is contained in:
Kuba Szczodrzyński 2022-12-06 10:22:47 +01:00
parent 5007587192
commit 5f8016061d
No known key found for this signature in database
GPG Key ID: 70CB8A85BA1633CB

View File

@ -73,7 +73,8 @@ fun JsonObject(vararg properties: Pair<String, Any?>): JsonObject {
is Number -> addProperty(key, value)
is Boolean -> addProperty(key, value)
is Enum<*> -> addProperty(key, value.toInt())
else -> add(key, property.toJsonElement())
null -> add(key, null)
else -> add(key, value.toJsonElement())
}
}
}