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 { ...@@ -175,7 +175,7 @@ struct Printer {
} }
void mapColon() const { void mapColon() const {
out_ += indentLevel_ ? " : " : ":"; out_ += indentLevel_ ? ": " : ":";
} }
private: private:
......
...@@ -560,17 +560,17 @@ TEST(Json, PrintTo) { ...@@ -560,17 +560,17 @@ TEST(Json, PrintTo) {
std::string expected = std::string expected =
R"({ R"({
false : true, false: true,
true : false, true: false,
0.5 : 0.25, 0.5: 0.25,
1.5 : 2.25, 1.5: 2.25,
0 : 1, 0: 1,
1 : 2, 1: 2,
2 : 3, 2: 3,
"a" : [ "a": [
{ {
"a" : "b", "a": "b",
"c" : "d" "c": "d"
}, },
12.5, 12.5,
"Yo Dawg", "Yo Dawg",
...@@ -579,9 +579,9 @@ TEST(Json, PrintTo) { ...@@ -579,9 +579,9 @@ TEST(Json, PrintTo) {
], ],
null null
], ],
"another" : 32.2, "another": 32.2,
"foo" : "bar", "foo": "bar",
"junk" : 12 "junk": 12
})"; })";
PrintTo(value, &oss); PrintTo(value, &oss);
EXPECT_EQ(expected, oss.str()); 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