treatsAsString

fun JsonElement?.treatsAsString(defValue: String = ""): String

Method used to treats a JsonElement value as null-safe String

Return

the JsonElement as null-safe String

Parameters

defValue

The default value to return if the JsonElement is null or is not a String value