commit 24/09/2025
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package database
|
||||
|
||||
import codes.Somecodes.Companion.ValiDateForLogHtml
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
import codes.Somecodes.Companion.toJsonString
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -50,7 +50,6 @@ class MariaDB(
|
||||
return regex.matches(time)
|
||||
}
|
||||
|
||||
private val objectMapper = jacksonObjectMapper()
|
||||
|
||||
/**
|
||||
* Convert SoundbankList, MessagebankList, LanguageLinkList, or SchedulebankList to a JSON String.
|
||||
@@ -59,7 +58,7 @@ class MariaDB(
|
||||
*/
|
||||
fun <T> ArrayListtoString(list: ArrayList<T>): String {
|
||||
return try {
|
||||
objectMapper.writeValueAsString(list)
|
||||
toJsonString(list)
|
||||
} catch (e: Exception) {
|
||||
Logger.error("Error converting list to JSON: ${e.message}" as Any)
|
||||
"[]"
|
||||
|
||||
Reference in New Issue
Block a user