Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKosta <konstantin.baumann@autodesk.com>2014-09-04 17:20:05 +0400
committerKosta <konstantin.baumann@autodesk.com>2014-09-04 17:20:05 +0400
commit17b1a14d622f396838fd52ba8d4fac2407a37e75 (patch)
treee7a67eaef3be43637678b9b0b0a453289ad5e407 /include/rapidjson
parent57e1c875534eb2e2c183c62e4421ad1a0bf8bf73 (diff)
add `Key()` method to `Writer` and `PrettyWriter`
Diffstat (limited to 'include/rapidjson')
-rw-r--r--include/rapidjson/prettywriter.h2
-rw-r--r--include/rapidjson/writer.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/rapidjson/prettywriter.h b/include/rapidjson/prettywriter.h
index f89be1b1..2fc9b757 100644
--- a/include/rapidjson/prettywriter.h
+++ b/include/rapidjson/prettywriter.h
@@ -88,6 +88,8 @@ public:
return Base::WriteStartObject();
}
+ bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
+
bool EndObject(SizeType memberCount = 0) {
(void)memberCount;
RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level));
diff --git a/include/rapidjson/writer.h b/include/rapidjson/writer.h
index 73e4aff5..2f46b66d 100644
--- a/include/rapidjson/writer.h
+++ b/include/rapidjson/writer.h
@@ -131,6 +131,8 @@ public:
return WriteStartObject();
}
+ bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
+
bool EndObject(SizeType memberCount = 0) {
(void)memberCount;
RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level));