Kaynağa Gözat

Show a link to the doc when user passes an unsupported input type

Benoit Blanchon 2 yıl önce
ebeveyn
işleme
7eec01cdd6
2 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 1 0
      CHANGELOG.md
  2. 3 1
      src/ArduinoJson/Deserialization/Reader.hpp

+ 1 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@ HEAD
 * Fix double lookup in `to<JsonVariant>()`
 * Fix double call to `size()` in `serializeMsgPack()`
 * Include `ARDUINOJSON_SLOT_OFFSET_SIZE` in the namespace name
+* Show a link to the documentation when user passes an unsupported input type
 
 v6.21.2 (2023-04-12)
 -------

+ 3 - 1
src/ArduinoJson/Deserialization/Reader.hpp

@@ -18,7 +18,9 @@ struct Reader {
   Reader(TSource& source) : source_(&source) {}
 
   int read() {
-    return source_->read();  // Error here? You passed an unsupported input type
+    // clang-format off
+    return source_->read();  // Error here? See https://arduinojson.org/v6/invalid-input/
+    // clang-format on
   }
 
   size_t readBytes(char* buffer, size_t length) {