folly/json: serialize \r and \n as \r and \n
authorAnton Likhtarov <alikhtarov@fb.com>
Wed, 26 Sep 2012 18:09:18 +0000 (11:09 -0700)
committerJordan DeLong <jdelong@fb.com>
Fri, 12 Oct 2012 04:33:51 +0000 (21:33 -0700)
commit49ccc34faf0fed773411c344c1ccaa32a64e2d24
tree0910c2fb8e4e4bfb230d6536c3b33e5da8b2a9d7
parent981ed98473314f0e3df5e0c4d47c8574d9523289
folly/json: serialize \r and \n as \r and \n

Summary:
Background: we want to use folly::json but not change the way data is represented.
Since we need to store \r and \n in strings and the library we're currently using does this,
let's do it in folly too.

Test Plan: unit tests pass

Reviewed By: delong.j@fb.com

FB internal diff: D584960
folly/json.cpp
folly/test/JsonTest.cpp