Skip to content

Commit

Permalink
[distribution] Ignore unknown keys (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
chromy authored Dec 12, 2024
1 parent 34e6371 commit b7a592e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ internal data class CheckForUpdatesSuccessResult(

private inline fun <reified T> tryDecode(s: String): T? {
return try {
Json.decodeFromString<T>(s)
val json = Json { ignoreUnknownKeys = true }
json.decodeFromString<T>(s)
} catch (_: SerializationException) {
null
} catch (_: IllegalArgumentException) {
Expand Down

0 comments on commit b7a592e

Please sign in to comment.