Option to fallback to double when int precision is not enough.
authorBartosz Nitka <bnitka@fb.com>
Fri, 23 Oct 2015 18:42:05 +0000 (11:42 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Fri, 23 Oct 2015 19:20:23 +0000 (12:20 -0700)
commita3bfe5b0fb2be9b21acd75c7d9fe825d248b105f
tree44a3965c37a0dcb0504f976fa8725525bbfcd357
parentd0889c8c36f0aa4a2773c0d9e95a2ff3eace6b89
Option to fallback to double when int precision is not enough.

Summary: Some libraries like Haskell's `Data.Aeson` can produce arbitrarily
big numbers with arbitrary precision.
The json standard doesn't specify the ranges for numeric types.
For interoperability, we should allow the user to parse the numbers with
some loss of precision.

Reviewed By: luciang

Differential Revision: D2565140

fb-gh-sync-id: b1a9a46e298bf13cc89d7e79ce28705e9e251a7f
folly/json.cpp
folly/json.h
folly/test/JsonTest.cpp