Add convenience method Key(std::basic_string<Ch> const&) to Writer

This commit is contained in:
Hartwig 2017-05-10 22:56:01 +02:00
parent fe2b3603e7
commit 568107e178

View File

@ -222,6 +222,13 @@ public:
bool Key(const Ch* str, SizeType length, bool copy = false) { return String(str, length, copy); }
#if RAPIDJSON_HAS_STDSTRING
bool Key(const std::basic_string<Ch>& str)
{
return Key(str.data(), SizeType(str.size()));
}
#endif
bool EndObject(SizeType memberCount = 0) {
(void)memberCount;
RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); // not inside an Object