Repository navigation
jsonParser
AmayaHena edited this page Jul 6, 2020
·
3 revisions
JSONParser();USAGE: classic default ctor
std::vector<std::pair<std::string, std::string>> parse(FileManager::File &f);
std::vector<std::pair<std::string, std::string>> parse(const std::vector<std::string> &v);USAGE: parse all the data that a .json file contains
PARAMETER:
f: File object
v: vector of string
std::vector<std::pair<std::string, std::string>> parse(FileManager::File &f, const std::string &match);
std::vector<std::pair<std::string, std::string>> parse(const std::vector<std::string> &v, const std::string &match);USAGE: parse all the data that a section contains
PARAMETER:
f: File object
v: vector of string
match: section to parse
std::string parseRV(FileManager::File &f, const std::string &match);
std::string parseRV(const std::vector<std::string> &v, const std::string &match);USAGE: parse a specific value, return the RV
PARAMETER:
f: File object
v: vector of string
match: LV to look for
std::vector<std::string> getSection(FileManager::File &f);
std::vector<std::string> getSection(const std::vector<std::string> &v);USAGE: parse all the sections name in a .json
PARAMETER:
f: File object
v: vector of string