28 const std::string
data =
"Hello world!";
31 std::cout <<
"Input string: " << data <<
std::endl;
32 std::cout <<
"Encode string: " << encodeString <<
std::endl;
34 #if JSON_USE_BASE64 == 1
35 std::cout <<
"JSON_USE_BASE64 == 1" <<
std::endl;
36 std::cout << ((encodeString==
"SGVsbG8gd29ybGQh")?
"Success":
"Fail") <<
std::endl;
38 std::cout <<
"JSON_USE_BASE64 != 1" <<
std::endl;
39 std::cout << ((encodeString==
data)?
"Success":
"Fail") <<
std::endl;
47 const std::string
data =
"Hello world!";
48 std::string encodeString;
50 #if JSON_USE_BASE64 == 1
51 std::cout <<
"JSON_USE_BASE64 == 1" <<
std::endl;
52 encodeString =
"SGVsbG8gd29ybGQh";
54 std::cout <<
"JSON_USE_BASE64 != 1" <<
std::endl;
60 std::cout <<
"Input string: " << encodeString <<
std::endl;
61 std::cout <<
"Decode string: " << decodeString <<
std::endl;
63 std::cout << ((decodeString==
data)?
"Success":
"Fail") <<
std::endl;