]> git.cworth.org Git - apitrace/blobdiff - json.hpp
Implement jump to.
[apitrace] / json.hpp
index d13793ebd64925f253c6a88e509b1213fbfc9e87..9e6b96004dc71be9dc96e85a6d4279f508c12765 100644 (file)
--- a/json.hpp
+++ b/json.hpp
@@ -34,8 +34,9 @@
 #include <stddef.h>
 #include <wchar.h>
 
-#include <ostream>
 #include <iomanip>
+#include <ostream>
+#include <string>
 
 
 class JSONWriter
@@ -240,6 +241,10 @@ public:
         value = false;
     }
 
+    inline void beginMember(const std::string &name) {
+        beginMember(name.c_str());
+    }
+
     inline void endMember(void) {
         assert(value);
         value = true;
@@ -271,6 +276,10 @@ public:
         space = ' ';
     }
 
+    inline void writeString(const std::string &s) {
+        writeString(s.c_str());
+    }
+
     inline void writeBase64(const void *bytes, size_t size) {
         separator();
         encodeBase64String((const unsigned char *)bytes, size);