treatsAsNullableString

fun JsonElement?.treatsAsNullableString(defValue: String? = null): String?

Method used to treats a JsonElement value as nullable String

Return

the JsonElement as nullable String

Parameters

defValue

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