26 lines
469 B
C++
26 lines
469 B
C++
#ifndef THREADPOOLDEMO_CCJSONOBJECT_H
|
|
#define THREADPOOLDEMO_CCJSONOBJECT_H
|
|
#include "nlohmann/json.hpp"
|
|
using JSON = nlohmann::json;
|
|
|
|
namespace CCJSON
|
|
{
|
|
JSON Parse(const char* str);
|
|
}
|
|
|
|
class CCJSONObject: public JSON
|
|
{
|
|
public:
|
|
CCJSONObject() = default;
|
|
CCJSONObject(JSON && j);
|
|
void Put(const char* key,nlohmann::json value);
|
|
JSON Get(const char* key);
|
|
std::string To_String();
|
|
private:
|
|
JSON j;
|
|
|
|
};
|
|
|
|
|
|
#endif //THREADPOOLDEMO_CCJSONOBJECT_H
|