Epic refactoring in progress...

This commit is contained in:
Benoit Blanchon
2014-10-28 16:29:55 +01:00
parent 852256c1af
commit 61218f12fd
13 changed files with 63 additions and 32 deletions

View File

@ -9,9 +9,15 @@
#include "ArduinoJson/Internals/JsonObjectImpl.hpp"
#include "ArduinoJson/Internals/JsonWriter.hpp"
using namespace ArduinoJson;
using namespace ArduinoJson::Internals;
void JsonValueImpl::writeTo(JsonWriter &writer) const {
JsonValueImpl* JsonValueImpl::createFrom(JsonBuffer* buffer) {
void* ptr = buffer->alloc(sizeof(JsonValueImpl));
return ptr ? new (ptr) JsonValueImpl() : NULL;
}
void JsonValueImpl::writeTo(JsonWriter& writer) const {
switch (_type) {
case JSON_ARRAY:
_content.asArray->writeTo(writer);