Files
ArduinoJson/srcs/JsonBuffer.cpp
T

21 lines
391 B
C++
Raw Normal View History

#include "JsonBuffer.h"
2014-09-27 16:18:40 +02:00
2014-10-09 14:17:09 +02:00
#include <new>
#include <string.h> // for memset
2014-09-27 16:18:40 +02:00
#include "JsonObject.h"
#include "JsonValue.h"
2014-10-01 16:08:32 +02:00
#include "Internals/JsonNode.h"
2014-09-27 16:18:40 +02:00
JsonValue JsonBuffer::createValue()
{
2014-10-09 14:17:09 +02:00
return JsonValue(createNode());
2014-09-27 16:18:40 +02:00
}
2014-10-09 14:17:09 +02:00
JsonNode* JsonBuffer::createNode()
{
2014-10-09 14:17:09 +02:00
void* node = allocateNode();
if (!node) return 0;
2014-10-09 14:17:09 +02:00
return new (node) JsonNode();
}