Replaced printTo() with serializeJson()

* Added `serializeJson()` and `serializeJsonPretty()`
* Added `measureJson()` and `measureJsonPretty()`
* Removed `printTo()` and `prettyPrintTo()`
* Removed `measureLength()` and `measurePrettyLength()`
This commit is contained in:
Benoit Blanchon
2018-03-01 09:24:58 +01:00
parent 7a2a64803a
commit 83d73c93f7
38 changed files with 238 additions and 233 deletions

View File

@ -18,7 +18,8 @@ std::stringstream allocatorLog;
struct SpyingAllocator : DefaultAllocator {
void* allocate(size_t n) {
allocatorLog << "A" << (n - DynamicJsonBuffer::EmptyBlockSize);
allocatorLog << static_cast<const char*>("A")
<< (n - DynamicJsonBuffer::EmptyBlockSize);
return DefaultAllocator::allocate(n);
}
void deallocate(void* p) {