diff options
Diffstat (limited to 'libs/libjson')
-rw-r--r-- | libs/libjson/src/libjson.def | 7 | ||||
-rw-r--r-- | libs/libjson/src/libjson64.def | 7 | ||||
-rw-r--r-- | libs/libjson/src/stdafx.cxx | 48 |
3 files changed, 61 insertions, 1 deletions
diff --git a/libs/libjson/src/libjson.def b/libs/libjson/src/libjson.def index 9d8b63ec49..027b0fd092 100644 --- a/libs/libjson/src/libjson.def +++ b/libs/libjson/src/libjson.def @@ -194,3 +194,10 @@ json_write @190 json_write_formatted @191
??6JSONNode@@QAEAAV0@ABV0@@Z @192 NONAME
??4JSONWorker@@QAEAAV0@$$QAV0@@Z @193 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUBOOL_PARAM@@@Z @194 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUCHAR_PARAM@@@Z @195 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUINT64_PARAM@@@Z @196 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUINT_PARAM@@@Z @197 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUWCHAR_PARAM@@@Z @198 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUJSON_PARAM@@@Z @199 NONAME
+??6@YGAAVJSONNode@@AAV0@ABUNULL_PARAM@@@Z @200 NONAME
diff --git a/libs/libjson/src/libjson64.def b/libs/libjson/src/libjson64.def index 1e501cba21..e22d9f62ac 100644 --- a/libs/libjson/src/libjson64.def +++ b/libs/libjson/src/libjson64.def @@ -194,3 +194,10 @@ json_write @190 json_write_formatted @191
??6JSONNode@@QEAAAEAV0@AEBV0@@Z @192 NONAME
??4JSONWorker@@QEAAAEAV0@$$QEAV0@@Z @193 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUBOOL_PARAM@@@Z @194 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUCHAR_PARAM@@@Z @195 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUINT64_PARAM@@@Z @196 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUINT_PARAM@@@Z @197 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUWCHAR_PARAM@@@Z @198 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUJSON_PARAM@@@Z @199 NONAME
+??6@YAAEAVJSONNode@@AEAV0@AEBUNULL_PARAM@@@Z @200 NONAME
diff --git a/libs/libjson/src/stdafx.cxx b/libs/libjson/src/stdafx.cxx index 6f97ed9a4e..b16af99abd 100644 --- a/libs/libjson/src/stdafx.cxx +++ b/libs/libjson/src/stdafx.cxx @@ -16,4 +16,50 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "stdafx.h"
\ No newline at end of file +#include "stdafx.h"
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const INT_PARAM ¶m)
+{
+ json.push_back(JSONNode(param.szName, param.iValue));
+ return json;
+}
+
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const INT64_PARAM ¶m)
+{
+ char tmp[100];
+ _i64toa_s(param.iValue, tmp, _countof(tmp), 10);
+ json.push_back(JSONNode(param.szName, tmp));
+ return json;
+}
+
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const BOOL_PARAM ¶m)
+{
+ json.push_back(JSONNode(param.szName, param.bValue));
+ return json;
+}
+
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const CHAR_PARAM ¶m)
+{
+ json.push_back(JSONNode(param.szName, param.szValue));
+ return json;
+}
+
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const WCHAR_PARAM ¶m)
+{
+ json.push_back(JSONNode(param.szName, ptrA(mir_utf8encodeW(param.wszValue)).get()));
+ return json;
+}
+
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const NULL_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, nullptr)); + return json; +}
+
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const JSON_PARAM ¶m) +{ + json.push_back(JSONNode(param.szName, param.node)); + return json; +} |