summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-17 18:05:48 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-17 18:05:48 +0300
commit78034bcd615e739ad51a1b4bc570b6f1927932fc (patch)
tree3584b0810f26158351a509d815ab61bdc00f8f52 /include
parent88da7ba66825d1e04f64ef36db9cbac1d7fec582 (diff)
json2file + file2json = helpers to load json from file and write it back
Diffstat (limited to 'include')
-rw-r--r--include/m_json.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/m_json.h b/include/m_json.h
index f258b0d9e6..62f3126ad1 100644
--- a/include/m_json.h
+++ b/include/m_json.h
@@ -166,6 +166,12 @@ LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const WCHAR_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const NULL_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const JSON_PARAM &param);
+// loads a JSON contents of a file
+LIBJSON_DLL(bool) file2json(const wchar_t *pwszFilename, JSONNode &root);
+
+// saves a JSON variable into a flie
+LIBJSON_DLL(bool) json2file(const JSONNode &root, const wchar_t *pwszFilename);
+
#endif // __cplusplus
#ifndef LIBJSON_EXPORTS