comparison OrthancFramework/UnitTestsSources/ToolboxTests.cpp @ 4394:f7104e9d044c

functions to read/write JSON in OrthancPluginCppWrapper.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Dec 2020 08:11:37 +0100
parents e8e95b80194f
children 3aeb5171fbd4
comparison
equal deleted inserted replaced
4393:e8e95b80194f 4394:f7104e9d044c
43 43
44 Json::Value c; 44 Json::Value c;
45 ASSERT_TRUE(Toolbox::ReadJson(c, b)); 45 ASSERT_TRUE(Toolbox::ReadJson(c, b));
46 46
47 std::string d, e; 47 std::string d, e;
48 Toolbox::WriteJson(d, a, true); 48 Toolbox::WriteFastJson(d, a);
49 Toolbox::WriteJson(e, c, true); 49 Toolbox::WriteFastJson(e, c);
50 ASSERT_EQ(d, e); 50 ASSERT_EQ(d, e);
51 51
52 std::string f, g; 52 std::string f, g;
53 Toolbox::WriteJson(f, a, false); 53 Toolbox::WriteStyledJson(f, a);
54 Toolbox::WriteJson(g, c, false); 54 Toolbox::WriteStyledJson(g, c);
55 ASSERT_EQ(f, g); 55 ASSERT_EQ(f, g);
56 56
57 /** 57 /**
58 * Check compatibility with the serialized string generated by 58 * Check compatibility with the serialized string generated by
59 * JsonCpp 1.7.4 (Ubuntu 18.04). "StripSpaces()" removes the 59 * JsonCpp 1.7.4 (Ubuntu 18.04). "StripSpaces()" removes the