DESCRIPTION

JCBC-1012: Add support for BigInteger and BigDecimal

Motivation
----------
It has been reported several times (on the forums and through customer
interactions) that BigDecimal and BigInteger support through the JsonObject
and JsonArray types would be appreciated.

Modifications
-------------
This changeset enables this functionality and adds test cases. Both JsonObject
and JsonArray now have more getters and setters for these types, but there
is one gotcha. By default jackson will read the BigDecimal as a double, which
is the type returned. For very long numbers there might be precision loss.

To combat this, the system property com.couchbase.json.decimalForFloat has
been introduced which, when set to true, will always read doubles as BigDecimal
on the jackson side and therefore trade speed for accuracy. Separate tests
have been added to assert this on a unit-test level.

Result
------
It is now possible to use BigInteger and BigDecimal types the same way as
one would do with other already supported types.

Change-Id: I357a9533692d705510018228fcadeec760f811f5
Reviewed-on: http://review.couchbase.org/71435
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Marques Ellis xxx@xxx.xxx
Reviewed-by: Cory Peck xxx@xxx.xxx


COMMENTS

author: Tate Garrett
date: 2017-01-02 13:34:11.667000000

Change has been successfully cherry-picked as ea582663fa44daa0edd68538bce0fbef2f1c0321 by Natasha Sullivan

-------------------------------------
