pineapple-src/externals/cpp-jwt/include/jwt/json/test_json.cc

25 lines
410 B
C++
Raw Normal View History

2022-07-26 03:25:01 +02:00
#include <iostream>
#include <string>
#if defined( CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
#include "./json.hpp"
#else
#include "nlohmann/json.hpp"
#endif
using json = nlohmann::json;
void basic_json_test()
{
json obj = json::object();
obj["test"] = "value-test";
obj["test-int"] = 42;
std::string jstr = obj.dump(0);
std::cout << jstr << std::endl;
}
int main() {
basic_json_test();
return 0;
}