forked from rcxpony/sparkle
13 lines
313 B
C++
13 lines
313 B
C++
![]() |
#ifndef UTILS_FUNCTIONS_HPP_
|
||
|
#define UTILS_FUNCTIONS_HPP_
|
||
|
struct functions {
|
||
|
static inline std::string isNull(const nlohmann::json& str) {
|
||
|
try {
|
||
|
return str.is_null() ? str.dump() : str.get<std::string>();
|
||
|
}
|
||
|
catch (...) {
|
||
|
return "null";
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
#endif
|