#pragma once
#include <string>
#include <vector>
#include <map>
#include "pandaLog.h"

using namespace std;

class cJSON;

typedef struct ConditionStruct
{
	std::map<std::string, float> mCondMap;
}Condition;

/**
    json解析对象
*/
class PANDALOG_API JsonParseObject
{
public:
	JsonParseObject();
	~JsonParseObject();

	bool getKeys(vector<string>& keys);

	void parse(string& jsonStr);

	void read(map<string, string>& resMap);
	void read(Condition& resMap);

	void read(map<string, vector<double>>& resMap);

	// 主动销毁已读取的数据
	void clear();
private:
	struct  cJSON* mResultJson; // json字符串对象
};