Le lun. 19 août 2019 à 08:23, Mark Struberg <strub...@yahoo.de.invalid> a
écrit :

> And another question:
>
> JsonNumber#isIntegral for loooooooong values - too long for long ;)
>
> How to determine whether it fits into a long?
> Should isIntegral() still return true if the numbers of digits are too
> long for
> long?
>


Pushed a stupid algo with a bad name yesterday, sthg like isFitLong. Far to
be perfect but avoid to parse always as BigDecimal so faster.

Integral just means no scientific notation or floating point from memory.


> LieGrue,
> strub
>
>
> Am Montag, den 19.08.2019, 08:08 +0200 schrieb Mark Struberg:
> > hi folks!
> >
> > What happens if you pass a null to the various JsonGenerator#write
> methods,
> > e.g
> >
> https://docs.oracle.com/javaee/7/api/javax/json/stream/JsonGenerator.html#write-java.math.BigInteger-
> > ?
> >
> > Should they blow up with a NullPointerException?
> > Or should they write a Json.NULL value?
> >
> > I didn't find much in the official API docs.
> > Does anyone remember how it should behave?
> >
> > Right now we do complicated Xxxx.valueOf(value) but later we blow up in
> > #justWrite because we do a value.length();
> >
> > LieGrue,
> > strub
> >
> >
>
>

Reply via email to