JsonHashTableBase.cpp 511 B

1234567891011121314151617181920212223242526272829
  1. #include "JsonHashTable.h"
  2. using namespace ArduinoJson::Generator;
  3. size_t JsonHashTableBase::printTo(Print& p) const
  4. {
  5. size_t n = 0;
  6. n += p.write('{');
  7. KeyValuePair* current = items;
  8. for (int i = 0; i < count; i++)
  9. {
  10. if (i > 0)
  11. {
  12. n += p.write(',');
  13. }
  14. n += current->key.printTo(p);
  15. n += p.write(':');
  16. n += current->value.printTo(p);
  17. current++;
  18. }
  19. n += p.write('}');
  20. return n;
  21. }