Allowing trailing comma in folly::parseJson
authorTom Jackson <tjackson@fb.com>
Tue, 2 Jul 2013 19:29:10 +0000 (12:29 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 9 Jul 2013 19:05:35 +0000 (12:05 -0700)
commitea72b037796a892aa00ef23902186d8f6b5d2ae9
tree370c7968ca6c2b482df9fbe7a46e0cbd9d240886
parentf13297ee4b5bf4f06e9efa52f3869daa34a433a7
Allowing trailing comma in folly::parseJson

Summary:
Introduced a new serialization option, `allow_trailing_comma`, which allows trailing commas to be included in strings when they are parsed. This isn't strictly allowed by RFC 4627, but we're allowing more than that anyway.

I've run into this dozens of times, especially while using SMC.

Test Plan: Unit tests

Reviewed By: delong.j@fb.com

FB internal diff: D872581
folly/json.cpp
folly/json.h
folly/test/JsonTest.cpp