early-access version 2862
This commit is contained in:
25447
externals/cpp-jwt/include/jwt/json/json.hpp
vendored
Executable file
25447
externals/cpp-jwt/include/jwt/json/json.hpp
vendored
Executable file
File diff suppressed because it is too large
Load Diff
24
externals/cpp-jwt/include/jwt/json/test_json.cc
vendored
Executable file
24
externals/cpp-jwt/include/jwt/json/test_json.cc
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user