mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 06:55:50 +00:00
Add Json::to_string:
This allows the declaration for FastWriter to be hidden and makes conversion of Json::Value objects to strings a little less clunky.
This commit is contained in:
committed by
Vinnie Falco
parent
8c1c2f5d05
commit
9cba944d21
@@ -1807,8 +1807,7 @@ void NetworkOPsImp::pubServer ()
|
||||
jvObj [jss::load_factor] =
|
||||
(mLastLoadFactor = getApp().getFeeTrack ().getLoadFactor ());
|
||||
|
||||
Json::FastWriter w;
|
||||
std::string sObj = w.write (jvObj);
|
||||
std::string sObj = to_string (jvObj);
|
||||
|
||||
|
||||
for (auto i = mSubServer.begin (); i != mSubServer.end (); )
|
||||
@@ -2701,8 +2700,7 @@ void NetworkOPsImp::pubValidatedTransaction (
|
||||
*alTx.getTxn (), alTx.getResult (), true, alAccepted);
|
||||
jvObj[jss::meta] = alTx.getMeta ()->getJson (0);
|
||||
|
||||
Json::FastWriter w;
|
||||
std::string sObj = w.write (jvObj);
|
||||
std::string sObj = to_string (jvObj);
|
||||
|
||||
{
|
||||
ScopedLockType sl (mLock);
|
||||
@@ -2814,8 +2812,7 @@ void NetworkOPsImp::pubAccountTransaction (
|
||||
if (alTx.isApplied ())
|
||||
jvObj[jss::meta] = alTx.getMeta ()->getJson (0);
|
||||
|
||||
Json::FastWriter w;
|
||||
std::string sObj = w.write (jvObj);
|
||||
std::string sObj = to_string (jvObj);
|
||||
|
||||
BOOST_FOREACH (InfoSub::ref isrListener, notify)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user