treatsAsLong

fun JsonElement?.treatsAsLong(defValue: Long = 0): Long

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

Return

the JsonElement as null-safe Long

Parameters

defValue

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