JsonHashTable.h 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Arduino JSON library
  3. * Benoit Blanchon 2014 - MIT License
  4. */
  5. #pragma once
  6. #include "JsonObjectBase.h"
  7. namespace ArduinoJson
  8. {
  9. namespace Parser
  10. {
  11. class JsonArray;
  12. class JsonHashTable : public JsonObjectBase
  13. {
  14. template <int N>
  15. friend class JsonParser;
  16. friend class JsonArray;
  17. public:
  18. JsonHashTable() {}
  19. bool containsKey(const char* key);
  20. JsonArray getArray(const char* key);
  21. bool getBool(const char* key);
  22. double getDouble(const char* key);
  23. JsonHashTable getHashTable(const char* key);
  24. long getLong(const char* key);
  25. char* getString(const char* key);
  26. private:
  27. JsonHashTable(char* json, jsmntok_t* tokens);
  28. jsmntok_t* getToken(const char* key);
  29. };
  30. }
  31. }