I have a data like this
{
"_double": 2.333,
"_float":3.14159,
"_int":314,
}
I will convert _ double
to double
(not accepted with Double
), and so on.
but the data given by the server sometimes looks like this
{
"_double":null,
"_float":null,
"_int":null,
}
I want to treat this number differently, because the default value 0.0
and this is null
are two cases that need to be handled differently. Therefore, it cannot be directly set to the default value.
because Double
and Float
have Double.NaN
and Float.NaN
I can set this by default, but there is no corresponding type for int
.