JsonObject.h 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Arduino JSON library
  3. * Benoit Blanchon 2014 - MIT License
  4. */
  5. #pragma once
  6. #include "JsonObjectBase.h"
  7. #ifndef ARDUINO_JSON_NO_DEPRECATION_WARNING
  8. #ifdef __GNUC__
  9. #define DEPRECATED __attribute__((deprecated))
  10. #elif defined(_MSC_VER)
  11. #define DEPRECATED __declspec(deprecated)
  12. #endif
  13. #else
  14. #define DEPRECATED
  15. #endif
  16. namespace ArduinoJson
  17. {
  18. namespace Generator
  19. {
  20. template <int N>
  21. class JsonObject : public JsonObjectBase
  22. {
  23. public:
  24. JsonObject()
  25. : JsonObjectBase(items, N)
  26. {
  27. }
  28. private:
  29. KeyValuePair items[N];
  30. };
  31. // Obsolete: use JsonObject instead
  32. template <int N>
  33. class DEPRECATED JsonHashTable : public JsonObject<N>
  34. {
  35. };
  36. }
  37. }