Mercurial > hg > orthanc
comparison OrthancFramework/Sources/RestApi/RestApiCall.cpp @ 4392:3af1d763763a
confining Json::Reader and Json::*Writer into Toolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Dec 2020 18:09:47 +0100 |
parents | bf7b9edf6b81 |
children | 80fd140b12ba |
comparison
equal
deleted
inserted
replaced
4391:0c4ff5609548 | 4392:3af1d763763a |
---|---|
23 #include "../PrecompiledHeaders.h" | 23 #include "../PrecompiledHeaders.h" |
24 #include "RestApiCall.h" | 24 #include "RestApiCall.h" |
25 | 25 |
26 namespace Orthanc | 26 namespace Orthanc |
27 { | 27 { |
28 bool RestApiCall::ParseJsonRequestInternal(Json::Value& result, | |
29 const void* body, | |
30 size_t size) | |
31 { | |
32 result.clear(); | |
33 Json::Reader reader; | |
34 return reader.parse(reinterpret_cast<const char*>(body), | |
35 reinterpret_cast<const char*>(body) + size, result); | |
36 } | |
37 | |
38 | |
39 std::string RestApiCall::FlattenUri() const | 28 std::string RestApiCall::FlattenUri() const |
40 { | 29 { |
41 std::string s = "/"; | 30 std::string s = "/"; |
42 | 31 |
43 for (size_t i = 0; i < fullUri_.size(); i++) | 32 for (size_t i = 0; i < fullUri_.size(); i++) |