Mercurial > hg > orthanc
comparison OrthancFramework/UnitTestsSources/LuaTests.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 | f7104e9d044c |
comparison
equal
deleted
inserted
replaced
4391:0c4ff5609548 | 4392:3af1d763763a |
---|---|
173 Orthanc::LuaFunctionCall f(lua, "DumpJson"); | 173 Orthanc::LuaFunctionCall f(lua, "DumpJson"); |
174 f.PushJson(a); | 174 f.PushJson(a); |
175 std::string s; | 175 std::string s; |
176 f.ExecuteToString(s); | 176 f.ExecuteToString(s); |
177 | 177 |
178 Json::FastWriter writer; | 178 std::string t; |
179 std::string t = writer.write(a); | 179 Orthanc::Toolbox::WriteJson(t, a, true /* fast */); |
180 | |
181 ASSERT_EQ(s, t); | 180 ASSERT_EQ(s, t); |
182 } | 181 } |
183 } | 182 } |