Extracted StringReader and StringWriter from JsonParser

Split `Internals/` folder into `Data/`, `Deserialization/`, `Serialization/`
This commit is contained in:
Benoit Blanchon
2016-12-21 22:09:13 +01:00
parent b923e8f4df
commit 8032a4b564
44 changed files with 230 additions and 132 deletions

View File

@@ -0,0 +1,25 @@
// Copyright Benoit Blanchon 2014-2016
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
// If you like this project, please add a star!
#pragma once
#include "../JsonBuffer.hpp"
namespace ArduinoJson {
namespace Internals {
class JsonBufferAllocated {
public:
void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() {
if (!jsonBuffer) return NULL;
return jsonBuffer->alloc(n);
}
void operator delete(void *, JsonBuffer *) throw() {}
};
}
}