json: Add option to parse numbers as strings
authorBartek Ryniec <bryniec@fb.com>
Fri, 4 Dec 2015 21:07:15 +0000 (13:07 -0800)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Sun, 6 Dec 2015 03:20:31 +0000 (19:20 -0800)
commit0dbbe8568985ac7966c4354dd89fe0a1771f1dc4
treec03360e7e9a90a5121144b8fbd41d87ef03adf2e
parentd662c1b73b6ee85b0743b19883bfc7606e3f6e6c
json: Add option to parse numbers as strings

Summary: Adding a flag in `folly::json::serialization_opts` that allows you to request all numbers to be parsed into strings. This saves you from exceptions being thrown by `folly::parseJson` if it encounters numbers that wouldn't fit in int64.

Reviewed By: yfeldblum

Differential Revision: D2713039

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