Commit 001320e2 authored by Nick Cooper's avatar Nick Cooper Committed by Facebook Github Bot

Remove the ' ' prior to : in folly::json's pretty output.

Summary: Remove the ' ' prior to : in folly::json's pretty output - this improves consistency with other JSON formatters.

Reviewed By: yfeldblum, luciang

Differential Revision: D8843977

fbshipit-source-id: 1d5c84d7d3806ad8752b619ffe23101f7f103683
parent f96d7622
......@@ -175,7 +175,7 @@ struct Printer {
}
void mapColon() const {
out_ += indentLevel_ ? " : " : ":";
out_ += indentLevel_ ? ": " : ":";
}
private:
......
......@@ -560,17 +560,17 @@ TEST(Json, PrintTo) {
std::string expected =
R"({
false : true,
true : false,
0.5 : 0.25,
1.5 : 2.25,
0 : 1,
1 : 2,
2 : 3,
"a" : [
false: true,
true: false,
0.5: 0.25,
1.5: 2.25,
0: 1,
1: 2,
2: 3,
"a": [
{
"a" : "b",
"c" : "d"
"a": "b",
"c": "d"
},
12.5,
"Yo Dawg",
......@@ -579,9 +579,9 @@ TEST(Json, PrintTo) {
],
null
],
"another" : 32.2,
"foo" : "bar",
"junk" : 12
"another": 32.2,
"foo": "bar",
"junk": 12
})";
PrintTo(value, &oss);
EXPECT_EQ(expected, oss.str());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment