mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 03:52:16 +02:00
Test that JsonArray can contain inner arrays
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "JsonObject.h"
|
||||
|
||||
#include "JsonValue.h"
|
||||
|
||||
#include "JsonArray.h"
|
||||
#include "JsonObject.h"
|
||||
#include "Internals/JsonNode.h"
|
||||
|
||||
void JsonValue::operator=(bool value)
|
||||
@ -40,7 +41,7 @@ void JsonValue::operator=(int value)
|
||||
_node->content.asInteger = value;
|
||||
}
|
||||
|
||||
void JsonValue::operator=(const JsonObject& object)
|
||||
void JsonValue::operator=(const JsonContainer& object)
|
||||
{
|
||||
setAsProxyTo(object._node);
|
||||
}
|
||||
@ -72,6 +73,7 @@ void JsonValue::operator=(JsonValue const& value)
|
||||
case JSON_ARRAY:
|
||||
case JSON_PROXY:
|
||||
setAsProxyTo(value._node);
|
||||
break;
|
||||
|
||||
default:
|
||||
*_node = *value._node;
|
||||
@ -115,6 +117,11 @@ JsonValue::operator int() const
|
||||
return node->content.asInteger;
|
||||
}
|
||||
|
||||
JsonValue::operator JsonArray() const
|
||||
{
|
||||
return JsonArray(getActualNode());
|
||||
}
|
||||
|
||||
JsonValue::operator JsonObject() const
|
||||
{
|
||||
return JsonObject(getActualNode());
|
||||
|
Reference in New Issue
Block a user