summaryrefslogtreecommitdiff
path: root/include/lib/ArduinoJson/Serialization/DummyPrint.hpp
blob: 9fdf2d6a0bfb90a7b0ac108fa1bd9b6d5aff627f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// MIT License

#pragma once

namespace ArduinoJson {
namespace Internals {

// A dummy Print implementation used in JsonPrintable::measureLength()
class DummyPrint {
 public:
  size_t print(char) {
    return 1;
  }

  size_t print(const char* s) {
    return strlen(s);
  }
};
}
}