comparison Framework/PullMode/PullJob.cpp @ 31:cfeda58d0c8e

remove calls to deprecated classes of JsonCpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Dec 2020 08:31:22 +0100
parents dfc43678aecb
children 44a0430d7899
comparison
equal deleted inserted replaced
30:3abebab5d004 31:cfeda58d0c8e
24 #include "../TransferScheduler.h" 24 #include "../TransferScheduler.h"
25 25
26 #include <Compatibility.h> // For std::unique_ptr 26 #include <Compatibility.h> // For std::unique_ptr
27 #include <Logging.h> 27 #include <Logging.h>
28 28
29 #include <json/writer.h>
30
31 29
32 namespace OrthancPlugins 30 namespace OrthancPlugins
33 { 31 {
34 class PullJob::CommitState : public IState 32 class PullJob::CommitState : public IState
35 { 33 {
167 info_.SetContent("Compression", EnumerationToString(job_.query_.GetCompression())); 165 info_.SetContent("Compression", EnumerationToString(job_.query_.GetCompression()));
168 } 166 }
169 167
170 virtual StateUpdate* Step() 168 virtual StateUpdate* Step()
171 { 169 {
172 Json::FastWriter writer; 170 std::string lookup;
173 const std::string lookup = writer.write(job_.query_.GetResources()); 171 Orthanc::Toolbox::WriteFastJson(lookup, job_.query_.GetResources());
174 172
175 Json::Value answer; 173 Json::Value answer;
176 if (!DoPostPeer(answer, job_.peers_, job_.peerIndex_, URI_LOOKUP, lookup, job_.maxHttpRetries_)) 174 if (!DoPostPeer(answer, job_.peers_, job_.peerIndex_, URI_LOOKUP, lookup, job_.maxHttpRetries_))
177 { 175 {
178 LOG(ERROR) << "Cannot retrieve the list of instances to pull from peer \"" 176 LOG(ERROR) << "Cannot retrieve the list of instances to pull from peer \""