Mercurial > hg > orthanc
comparison OrthancFramework/UnitTestsSources/RestApiTests.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 | a85e74235a78 |
children | f7104e9d044c |
comparison
equal
deleted
inserted
replaced
4391:0c4ff5609548 | 4392:3af1d763763a |
---|---|
339 root.Register("/hello/{world}/test3/test4", SetValue<3>); | 339 root.Register("/hello/{world}/test3/test4", SetValue<3>); |
340 root.Register("/hello2/*", SetValue<4>); | 340 root.Register("/hello2/*", SetValue<4>); |
341 | 341 |
342 Json::Value m; | 342 Json::Value m; |
343 root.CreateSiteMap(m); | 343 root.CreateSiteMap(m); |
344 std::cout << m; | 344 |
345 std::string s; | |
346 Toolbox::WriteJson(s, m, false /* styled, not fast */); | |
345 | 347 |
346 Json::Value d; | 348 Json::Value d; |
347 ASSERT_FALSE(GetDirectory(d, root, "/hello")); | 349 ASSERT_FALSE(GetDirectory(d, root, "/hello")); |
348 | 350 |
349 ASSERT_TRUE(GetDirectory(d, root, "/hello/a")); | 351 ASSERT_TRUE(GetDirectory(d, root, "/hello/a")); |