mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove linefeed from JSON to string conversion
This commit is contained in:
@@ -190,7 +190,6 @@ FastWriter::write ( const Value& root )
|
||||
{
|
||||
document_ = "";
|
||||
writeValue ( root );
|
||||
document_ += "\n";
|
||||
return std::move (document_);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,6 @@ struct Output_test : ripple::RPC::TestOutputSuite
|
||||
|
||||
// Compare with the original version.
|
||||
auto expected = Json::FastWriter().write (value);
|
||||
expected.resize (expected.size() - 1);
|
||||
// For some reason, the FastWriter puts a carriage return on the end of
|
||||
// every piece of Json it outputs.
|
||||
|
||||
expectResult (expected);
|
||||
expectResult (valueDesc);
|
||||
expectResult (jsonAsString (value));
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
{
|
||||
testcase ("parse json array");
|
||||
std::string const json (
|
||||
"{\"Template\":[{\"ModifiedNode\":{\"Sequence\":1}}]}\n");
|
||||
"{\"Template\":[{\"ModifiedNode\":{\"Sequence\":1}}]}");
|
||||
|
||||
Json::Value jsonObject;
|
||||
bool parsedOK (parseJSONString(json, jsonObject));
|
||||
|
||||
Reference in New Issue
Block a user