getElementOrNull

abstract fun getElementOrNull(key: String): JsonElement?

安全地获取与指定键关联的 JsonElement

Return

对应的 JsonElement;如果键不存在,则返回 null

Parameters

key

要获取的值的键名。