mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
fixing error is nholmann traits
This commit is contained in:
@@ -7,7 +7,8 @@ set(TEST_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/HelperTest.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TestMain.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TokenFormatTest.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TokenTest.cpp)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TokenTest.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/NlohmannTest.cpp)
|
||||
|
||||
add_executable(jwt-cpp-test ${TEST_SOURCES})
|
||||
target_compile_options(jwt-cpp-test PRIVATE
|
||||
|
||||
@@ -26,10 +26,10 @@ struct nlohmann_traits {
|
||||
throw std::logic_error("invalid type");
|
||||
}
|
||||
|
||||
static json::value_t as_object(const json &val) {
|
||||
static json::object_t as_object(const json &val) {
|
||||
if (val.type() != json::value_t::object)
|
||||
throw std::bad_cast();
|
||||
return val.get<json::value_t>();
|
||||
return val.get<json::object_t>();
|
||||
}
|
||||
|
||||
static std::string as_string(const json &val) {
|
||||
|
||||
Reference in New Issue
Block a user