2014-10-23 23:39:22 +02:00
|
|
|
// Copyright Benoit Blanchon 2014
|
|
|
|
// MIT License
|
|
|
|
//
|
|
|
|
// Arduino JSON library
|
|
|
|
// https://github.com/bblanchon/ArduinoJson
|
|
|
|
|
2014-10-19 15:46:36 +02:00
|
|
|
#include "ArduinoJson/JsonValue.hpp"
|
2014-10-16 16:25:42 +02:00
|
|
|
|
2014-10-19 15:46:36 +02:00
|
|
|
#include "ArduinoJson/JsonArray.hpp"
|
2014-10-27 13:34:54 +01:00
|
|
|
#include "ArduinoJson/JsonObject.hpp"
|
2014-10-16 16:25:42 +02:00
|
|
|
|
2014-10-18 23:05:54 +02:00
|
|
|
using namespace ArduinoJson;
|
|
|
|
|
2014-10-26 21:18:09 +01:00
|
|
|
JsonValue::operator JsonArray() const {
|
|
|
|
return _impl ? JsonArray(*_impl) : JsonArray();
|
2014-10-16 16:25:42 +02:00
|
|
|
}
|
2014-10-27 13:34:54 +01:00
|
|
|
|
|
|
|
JsonValue::operator JsonObject() const {
|
|
|
|
return _impl ? JsonObject(*_impl) : JsonObject();
|
|
|
|
}
|
|
|
|
|
|
|
|
void JsonValue::operator=(JsonArray array) {
|
|
|
|
if (_impl) _impl->set(array._impl);
|
|
|
|
}
|
|
|
|
|
|
|
|
void JsonValue::operator=(JsonObject object) {
|
|
|
|
if (_impl) _impl->set(object._impl);
|
|
|
|
}
|