JsonHashTable.h 649 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * malloc-free JSON parser for Arduino
  3. * Benoit Blanchon 2014 - MIT License
  4. */
  5. #ifndef __JSONHASHTABLE_H
  6. #define __JSONHASHTABLE_H
  7. #include "JsonObjectBase.h"
  8. class JsonArray;
  9. class JsonHashTable : public JsonObjectBase
  10. {
  11. template <int N>
  12. friend class JsonParser;
  13. friend class JsonArray;
  14. public:
  15. JsonHashTable() {}
  16. JsonArray getArray(char* key);
  17. bool getBool(char* key);
  18. double getDouble(char* key);
  19. JsonHashTable getHashTable(char* key);
  20. long getLong(char* key);
  21. char* getString(char* key);
  22. private:
  23. JsonHashTable(char* json, jsmntok_t* tokens);
  24. jsmntok_t* getToken(char* key);
  25. };
  26. #endif