Files
ArduinoJson/JsonParser/JsonHashTable.h

77 lines
1.5 KiB
C
Raw Normal View History

2014-07-03 13:58:08 +02:00
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
2014-01-11 15:05:35 +01:00
2014-07-03 13:58:08 +02:00
#pragma once
2014-01-11 15:05:35 +01:00
#include "JsonValue.h"
2014-07-03 14:00:51 +02:00
namespace ArduinoJson
2014-01-11 15:05:35 +01:00
{
2014-07-03 14:00:51 +02:00
namespace Parser
{
class JsonArray;
class JsonHashTable
2014-07-03 14:00:51 +02:00
{
friend class JsonValue;
2014-01-11 15:05:35 +01:00
2014-07-03 14:00:51 +02:00
public:
2014-01-11 15:05:35 +01:00
JsonHashTable() {}
2014-01-11 15:05:35 +01:00
bool success()
{
return value.success();
}
JsonValue operator[](const char* key)
{
return value[key];
}
bool containsKey(const char* key)
{
return value[key];
}
2014-07-16 13:53:56 +02:00
DEPRECATED JsonArray getArray(const char* key);
2014-07-16 13:53:56 +02:00
DEPRECATED bool getBool(const char* key)
{
return value[key];
}
2014-07-16 13:53:56 +02:00
DEPRECATED double getDouble(const char* key)
{
return value[key];
}
2014-07-16 13:53:56 +02:00
DEPRECATED JsonHashTable getHashTable(const char* key)
{
return value[key];
}
2014-07-16 13:53:56 +02:00
DEPRECATED long getLong(const char* key)
{
return value[key];
}
2014-01-13 19:46:53 +01:00
2014-07-16 13:53:56 +02:00
DEPRECATED char* getString(const char* key)
{
return value[key];
}
2014-01-11 15:05:35 +01:00
2014-07-03 14:00:51 +02:00
private:
2014-01-11 15:05:35 +01:00
JsonHashTable(JsonValue& value)
: value(value)
{
}
JsonValue value;
2014-07-03 14:00:51 +02:00
};
}
}