From ac0fc79c76fc92783d2a5267082a1f8f9c28df22 Mon Sep 17 00:00:00 2001 From: Gustav Date: Mon, 18 May 2020 14:06:39 +0200 Subject: [PATCH] Fixes issue #1718 diff -Naur ./include/rapidjson/writer.h.orig ./include/rapidjson/writer.h --- ./include/rapidjson/writer.h.orig 2016-08-25 09:59:05.000000000 +0200 +++ ./include/rapidjson/writer.h 2021-07-25 12:28:55.287678300 +0200 @@ -251,6 +251,8 @@ */ bool RawValue(const Ch* json, size_t length, Type type) { Prefix(type); return EndValue(WriteRawValue(json, length)); } + static const size_t kDefaultLevelDepth = 32; + protected: //! Information for each nested level struct Level { @@ -259,8 +261,6 @@ bool inArray; //!< true if in array, otherwise in object }; - static const size_t kDefaultLevelDepth = 32; - bool WriteNull() { PutReserve(*os_, 4); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true; From d88be8ef1649eca4602348d1aab5c16c36f83d4f Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Mon, 27 Mar 2017 14:05:03 +0800 Subject: [PATCH] Fix #905 unable to set writeFlags for PrettyWriter diff -Naur ./include/rapidjson/prettywriter.h.orig ./include/rapidjson/prettywriter.h --- ./include/rapidjson/prettywriter.h.orig 2016-08-25 09:59:05.000000000 +0200 +++ ./include/rapidjson/prettywriter.h 2021-07-25 12:28:55.295703700 +0200 @@ -42,7 +42,7 @@ template, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags> class PrettyWriter : public Writer { public: - typedef Writer Base; + typedef Writer Base; typedef typename Base::Ch Ch; //! Constructor