booleanValueOrNull

fun JsonElement.booleanValueOrNull(vararg keys: String): Boolean?

Navigates to the nested element at keys and returns its boolean value, or null if not found. Extension function on JsonElement.