From 17b1a14d622f396838fd52ba8d4fac2407a37e75 Mon Sep 17 00:00:00 2001 From: Kosta Date: Thu, 4 Sep 2014 15:20:05 +0200 Subject: [PATCH] add `Key()` method to `Writer` and `PrettyWriter` --- include/rapidjson/prettywriter.h | 2 ++ include/rapidjson/writer.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/rapidjson/prettywriter.h b/include/rapidjson/prettywriter.h index f89be1b..2fc9b75 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 73e4aff..2f46b66 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));