From 5458e916ea5eb65a27e323dbb2bd9c6652a820dc Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Sun, 23 Jul 2023 18:08:21 +0200 Subject: [PATCH] Show a link to the doc when user passes an unsupported input type Ported from 7eec01cdd6fbbda41089f1fd9ecca133dd96b4c7 --- CHANGELOG.md | 1 + src/ArduinoJson/Deserialization/Reader.hpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 148f2e19..66045814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,3 +21,4 @@ HEAD * Remove `JsonVariant::shallowCopy()` * `JsonDocument`'s capacity grows as needed, no need to pass it to the constructor anymore * `JsonDocument`'s allocator is not monotonic anymore, removed values get recycled +* Show a link to the documentation when user passes an unsupported input type diff --git a/src/ArduinoJson/Deserialization/Reader.hpp b/src/ArduinoJson/Deserialization/Reader.hpp index 5f18c7b3..44437686 100644 --- a/src/ArduinoJson/Deserialization/Reader.hpp +++ b/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) {