write audit log call variant which accepts json objects; old/new value logging for...
[public/netxms.git] / src / server / core / tools.cpp
index 95de838..57cbe83 100644 (file)
@@ -471,3 +471,14 @@ ObjectArray<ObjectsDistance> *FindNearestObjects(UINT32 currObjectId, int maxDis
    currObj->decRefCount();
    return result;
 }
+
+/**
+ * Create JSON string from wide character string
+ */
+json_t *json_string_w(const WCHAR *s)
+{
+   char *us = UTF8StringFromWideString(s);
+   json_t *js = json_string(us);
+   free(us);
+   return js;
+}