Files
ArduinoJson/src/JsonValue.cpp

27 lines
608 B
C++
Raw Normal View History

2014-10-23 23:39:22 +02:00
// Copyright Benoit Blanchon 2014
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
#include "ArduinoJson/JsonArray.hpp"
2014-10-27 13:34:54 +01:00
#include "ArduinoJson/JsonObject.hpp"
2014-10-27 22:50:50 +01:00
#include "ArduinoJson/JsonValue.hpp"
2014-10-16 16:25:42 +02:00
2014-10-18 23:05:54 +02:00
using namespace ArduinoJson;
2014-10-27 22:50:50 +01:00
JsonValue::operator JsonArray() {
return JsonArray(_impl ? _impl->asArray() : NULL);
2014-10-16 16:25:42 +02:00
}
2014-10-27 13:34:54 +01:00
2014-10-27 22:50:50 +01:00
JsonValue::operator JsonObject() {
return JsonObject(_impl ? _impl->asObject() : NULL);
2014-10-27 13:34:54 +01:00
}
2014-10-27 22:50:50 +01:00
void JsonValue::set(JsonArray array) {
2014-10-27 13:34:54 +01:00
if (_impl) _impl->set(array._impl);
}
2014-10-27 22:50:50 +01:00
void JsonValue::set(JsonObject object) {
2014-10-27 13:34:54 +01:00
if (_impl) _impl->set(object._impl);
}