mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-29 18:27:37 +02:00
Formated code with clang-format
This commit is contained in:
@ -3,42 +3,29 @@
|
||||
#include "JsonContainer.hpp"
|
||||
#include "JsonArrayIterator.hpp"
|
||||
|
||||
namespace ArduinoJson
|
||||
{
|
||||
class JsonArray : public JsonContainer
|
||||
{
|
||||
public:
|
||||
JsonArray()
|
||||
{
|
||||
}
|
||||
namespace ArduinoJson {
|
||||
class JsonArray : public JsonContainer {
|
||||
public:
|
||||
JsonArray() {}
|
||||
|
||||
explicit JsonArray(Internals::JsonNode* node)
|
||||
: JsonContainer(node)
|
||||
{
|
||||
}
|
||||
explicit JsonArray(Internals::JsonNode *node) : JsonContainer(node) {}
|
||||
|
||||
JsonValue operator[](int index) const;
|
||||
JsonValue operator[](int index) const;
|
||||
|
||||
void add(bool value);
|
||||
void add(const char* value);
|
||||
void add(double value, int decimals=2);
|
||||
void add(int value) { add(static_cast<long>(value)); }
|
||||
void add(long value);
|
||||
void add(JsonContainer nestedArray); // TODO: should allow JsonValue too
|
||||
void add(bool value);
|
||||
void add(const char *value);
|
||||
void add(double value, int decimals = 2);
|
||||
void add(int value) { add(static_cast<long>(value)); }
|
||||
void add(long value);
|
||||
void add(JsonContainer nestedArray); // TODO: should allow JsonValue too
|
||||
|
||||
JsonArray createNestedArray();
|
||||
JsonObject createNestedObject();
|
||||
JsonArray createNestedArray();
|
||||
JsonObject createNestedObject();
|
||||
|
||||
bool success()
|
||||
{
|
||||
return _node && _node->isArray();
|
||||
}
|
||||
bool success() { return _node && _node->isArray(); }
|
||||
|
||||
JsonArrayIterator begin();
|
||||
JsonArrayIterator begin();
|
||||
|
||||
JsonArrayIterator end()
|
||||
{
|
||||
return JsonArrayIterator(0);
|
||||
}
|
||||
};
|
||||
JsonArrayIterator end() { return JsonArrayIterator(0); }
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user