Skip to content

Commit

Permalink
Misc: Ignore unknown json keys
Browse files Browse the repository at this point in the history
  • Loading branch information
camnwalter authored and mattco98 committed Jul 4, 2024
1 parent 1a4a1ae commit a6881fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/kotlin/com/chattriggers/ctjs/CTJS.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ class CTJS : ClientModInitializer {
internal val sounds = mutableListOf<Sound>()
internal val isDevelopment = FabricLoader.getInstance().isDevelopmentEnvironment

internal val json = Json { useAlternativeNames = true }
internal val json = Json {
useAlternativeNames = true
ignoreUnknownKeys = true
}

@JvmOverloads
internal fun makeWebRequest(url: String, userAgent: String? = "Mozilla/5.0 (ChatTriggers)"): URLConnection =
Expand Down

0 comments on commit a6881fd

Please sign in to comment.