29 lines
No EOL
550 B
C++
29 lines
No EOL
550 B
C++
#ifndef _HEADER_ETHERYOBLOG_JSON
|
|
#define _HEADER_ETHERYOBLOG_JSON
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
namespace Etheryo {
|
|
|
|
typedef std::unordered_map<std::string, std::string> Data;
|
|
typedef std::vector<Data> Json;
|
|
|
|
class JsonHandler {
|
|
public:
|
|
JsonHandler();
|
|
void clear();
|
|
void add(const std::vector<std::string>& names);
|
|
std::string& operator[](const std::string& rvalue);
|
|
void push();
|
|
std::string to_str();
|
|
|
|
private:
|
|
Data _dataBuffer;
|
|
Json _buffer;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // _HEADER_ETHERYOBLOG_JSON
|