mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 13:02:25 +02:00
Moved JsonValue to namespace ArduinoJson::Generator
This commit is contained in:
@ -22,7 +22,7 @@ namespace ArduinoJson
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Internals::JsonValue items[N];
|
JsonValue items[N];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,7 +14,7 @@ namespace ArduinoJson
|
|||||||
class JsonArrayBase : public JsonPrintable
|
class JsonArrayBase : public JsonPrintable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
JsonArrayBase(Internals::JsonValue* items, int capacity)
|
JsonArrayBase(JsonValue* items, int capacity)
|
||||||
: items(items), capacity(capacity), count(0)
|
: items(items), capacity(capacity), count(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ namespace ArduinoJson
|
|||||||
{
|
{
|
||||||
if (count >= capacity) return;
|
if (count >= capacity) return;
|
||||||
|
|
||||||
Internals::JsonValue& v = items[count++];
|
JsonValue& v = items[count++];
|
||||||
v.set<DIGITS>(value);
|
v.set<DIGITS>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ namespace ArduinoJson
|
|||||||
using JsonPrintable::printTo;
|
using JsonPrintable::printTo;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Internals::JsonValue* items;
|
JsonValue* items;
|
||||||
int capacity, count;
|
int capacity, count;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace ArduinoJson
|
|||||||
struct KeyValuePair
|
struct KeyValuePair
|
||||||
{
|
{
|
||||||
Internals::EscapedString key;
|
Internals::EscapedString key;
|
||||||
Internals::JsonValue value;
|
JsonValue value;
|
||||||
};
|
};
|
||||||
|
|
||||||
JsonObjectBase(KeyValuePair* items, int capacity)
|
JsonObjectBase(KeyValuePair* items, int capacity)
|
||||||
@ -45,7 +45,7 @@ namespace ArduinoJson
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Internals::JsonValue& getValue(const char* key);
|
JsonValue& getValue(const char* key);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KeyValuePair* items;
|
KeyValuePair* items;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "EscapedString.h"
|
#include "EscapedString.h"
|
||||||
#include "JsonValue.h"
|
#include "JsonValue.h"
|
||||||
|
|
||||||
using namespace ArduinoJson::Internals;
|
using namespace ArduinoJson::Generator;
|
||||||
|
|
||||||
JsonValue JsonValue::nullInstance;
|
JsonValue JsonValue::nullInstance;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace ArduinoJson
|
namespace ArduinoJson
|
||||||
{
|
{
|
||||||
namespace Internals
|
namespace Generator
|
||||||
{
|
{
|
||||||
class JsonValue
|
class JsonValue
|
||||||
{
|
{
|
||||||
@ -76,7 +76,7 @@ namespace ArduinoJson
|
|||||||
bool asBool;
|
bool asBool;
|
||||||
long asLong;
|
long asLong;
|
||||||
Printable* asPrintable;
|
Printable* asPrintable;
|
||||||
EscapedString asString;
|
Internals::EscapedString asString;
|
||||||
double asDouble;
|
double asDouble;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "JsonValue.h"
|
#include "JsonValue.h"
|
||||||
|
|
||||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||||
|
using namespace ArduinoJson::Generator;
|
||||||
using namespace ArduinoJson::Internals;
|
using namespace ArduinoJson::Internals;
|
||||||
|
|
||||||
namespace JsonGeneratorTests
|
namespace JsonGeneratorTests
|
||||||
|
Reference in New Issue
Block a user