Skip to content

Commit

Permalink
Add convenience method Key(std::basic_string<Ch> const&) to Writer
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartwig committed May 10, 2017
1 parent fe2b360 commit 568107e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/rapidjson/writer.h
Expand Up @@ -222,6 +222,13 @@ class Writer {

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
Expand Down

0 comments on commit 568107e

Please sign in to comment.