1 #ifndef LICORNEA_JSON_H_ 2 #define LICORNEA_JSON_H_ 24 inline bool has(
const json& j,
const std::string& key) {
25 return (j.count(key) == 1);
28 T
get_or(
const json& j,
const std::string& key,
const T& default_value) {
29 if(
has(j, key))
return j[key];
30 else return default_value;
bool has(const json &j, const std::string &key)
std::string in_filename_arg()
cv::Mat_< real > decode_mat(const json &j)
json encode_mat(const Mat &mat)
void export_json_file(const json &j, const std::string &filename, bool compact)
T get_or(const json &j, const std::string &key, const T &default_value)
json import_json_file(const std::string &filename)
json encode_mat_(const cv::Mat_< real > &mat)