floatOrNull

val JsonPrimitive.floatOrNull: Float?

Returns content of current element as float or null if current element is not a valid representation of number