On Feb 7, 4:26 am, Jesse Wilson <
jessewil...@google.com> wrote:
> Just call intValue() on the returned number?
That is what i am currently doing but there are two things flawed with
that approach:
1. There is no hashCode/Equals on that class. It is not possible to
assert any values with the LazilyParsedNumber. A proper implementation
would compare to the xxValue() where xx is the type of the wrapped
number.
2. Producing the LazilyParsedNumber spills api from gson into model
objects that should not be aware of the gson layer. Yes, one can just
assume it to be of type Number but it still feels awkward.
Regards
Moritz Post