Merged JsonArrayNode and JsonObjectNode into a single template

This commit is contained in:
Benoit Blanchon
2014-11-05 11:09:48 +01:00
parent 5d0e326bfd
commit 768312e870
6 changed files with 52 additions and 74 deletions

View File

@@ -1,21 +0,0 @@
// Copyright Benoit Blanchon 2014
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
#pragma once
#include "../JsonVariant.hpp"
namespace ArduinoJson {
namespace Internals {
struct JsonArrayNode {
JsonArrayNode() : next(NULL) {}
JsonVariant content;
JsonArrayNode* next;
};
}
}

View File

@@ -6,16 +6,15 @@
#pragma once
#include "../JsonPair.hpp"
namespace ArduinoJson {
namespace Internals {
struct JsonObjectNode {
JsonObjectNode() : next(NULL) {}
template <typename T>
struct Node {
Node() : next(NULL) {}
JsonPair content;
JsonObjectNode* next;
T content;
Node<T>* next;
};
}
}