treatsAsShort

fun JsonElement?.treatsAsShort(defValue: Short = 0): Short

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

Return

the JsonElement as null-safe Short

Parameters

defValue

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