mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 04:52:22 +02:00
52 lines
958 B
C++
52 lines
958 B
C++
/*
|
|
* Arduino JSON library
|
|
* Benoit Blanchon 2014 - MIT License
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "JsonToken.h"
|
|
|
|
#ifndef ARDUINO_JSON_NO_DEPRECATED_WARNING
|
|
#ifdef __GNUC__
|
|
#define DEPRECATED __attribute__((deprecated))
|
|
#elif defined(_MSC_VER)
|
|
#define DEPRECATED __declspec(deprecated)
|
|
#endif
|
|
#else
|
|
#define DEPRECATED
|
|
#endif
|
|
|
|
namespace ArduinoJson
|
|
{
|
|
namespace Parser
|
|
{
|
|
class JsonValue : protected JsonToken
|
|
{
|
|
public:
|
|
|
|
JsonValue()
|
|
{
|
|
|
|
}
|
|
|
|
JsonValue(JsonToken token)
|
|
: JsonToken(token)
|
|
{
|
|
|
|
}
|
|
|
|
bool success()
|
|
{
|
|
return isValid();
|
|
}
|
|
|
|
operator bool();
|
|
operator double();
|
|
operator long();
|
|
operator char*();
|
|
JsonValue operator[](int index);
|
|
JsonValue operator[](const char*key);
|
|
};
|
|
}
|
|
} |