fix chat component array reading

This commit is contained in:
Bixilon 2022-06-06 14:13:01 +02:00
parent 9ec8512523
commit 5467a3d23f
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -114,7 +114,7 @@ interface ChatComponent {
val whitespaceLess = string.removeTrailingWhitespaces()
if (whitespaceLess.startsWith('{') || whitespaceLess.startsWith('[')) {
try {
val read: Any = Jackson.MAPPER.readValue(whitespaceLess, Jackson.JSON_MAP_TYPE)
val read: Any = Jackson.MAPPER.readValue(whitespaceLess, Any::class.java)
return of(read, translator, parent, ignoreJson = true, restrictedMode)
} catch (ignored: JacksonException) {
}