Fix bug in stripComments
authorPavlo Kushnir <pavlo@fb.com>
Mon, 8 Sep 2014 17:32:04 +0000 (10:32 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 9 Sep 2014 21:22:23 +0000 (14:22 -0700)
commitc9f5e53987f2e67c234546b576b15cce4bdfacbe
treebacc93b71137e2f1faa7dd60f52e00ac7ec3f4dc
parentbe42394a1a5aae9689a7a02b7d9e9333829f37e6
Fix bug in stripComments

Summary: the bug is in InString state when we escape only '"' character. We should escape at least '\\' and '"'. This diffs simply escapes any character after '\\'.

Test Plan: folly unit tests, mcrouter unit tests

Reviewed By: stepan@fb.com

Subscribers: njormrod

FB internal diff: D1540836
folly/json.cpp
folly/test/json_test_data/commented.json
folly/test/json_test_data/commented.json.exp