From be1eafa12cc05bb2f7971fb170b2703526748cb7 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 28 Dec 2021 22:58:14 +0100 Subject: [PATCH] :memo: add note for https://github.com/nlohmann/json/issues/874#issuecomment-1001699139 --- doc/examples/iterator_wrapper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/examples/iterator_wrapper.cpp b/doc/examples/iterator_wrapper.cpp index 7ef5bc57e..84d37254b 100644 --- a/doc/examples/iterator_wrapper.cpp +++ b/doc/examples/iterator_wrapper.cpp @@ -9,6 +9,12 @@ int main() json j_object = {{"one", 1}, {"two", 2}}; json j_array = {1, 2, 4, 8, 16}; + ////////////////////////////////////////////////////////////////////////// + // The static function iterator_wrapper was deprecated in version 3.1.0 + // and will be removed in version 4.0.0. Please replace all occurrences + // of iterator_wrapper(j) with j.items(). + ////////////////////////////////////////////////////////////////////////// + // example for an object for (auto& x : json::iterator_wrapper(j_object)) {