folly::fbstring output = folly::parseJson(jsonInput).asString();
folly::fbstring jsonOutput = folly::toJson(output);
- LOG(INFO) << "input: " << input
- <<" => json: " << jsonInput;
- LOG(INFO) << "output: " << output
- <<" => json: " << jsonOutput;
-
EXPECT_EQ(input, output);
EXPECT_EQ(jsonInput, jsonOutput);
folly::fbstring output = folly::parseJson(jsonInput).asString();
folly::fbstring jsonOutput = folly::json::serialize(output, opts);
- LOG(INFO) << "input: " << input
- <<" => json: " << jsonInput;
- LOG(INFO) << "output: " << output
- <<" => json: " << jsonOutput;
-
EXPECT_EQ(input, output);
EXPECT_EQ(jsonInput, jsonOutput);