diff --git a/README.md b/README.md index d1341376c..d428e4c47 100644 --- a/README.md +++ b/README.md @@ -579,7 +579,7 @@ bool foo = j.at(2); j == R"(["foo", 1, true, 1.78])"_json; // true // other stuff -j.size(); // 3 entries +j.size(); // 4 entries j.empty(); // false j.type(); // json::value_t::array j.clear(); // the array is empty again diff --git a/doc/mkdocs/docs/features/parsing/parse_exceptions.md b/doc/mkdocs/docs/features/parsing/parse_exceptions.md index b882e0b5c..f0569b8e2 100644 --- a/doc/mkdocs/docs/features/parsing/parse_exceptions.md +++ b/doc/mkdocs/docs/features/parsing/parse_exceptions.md @@ -8,7 +8,7 @@ try { j = json::parse(my_input); } -catch (json::exception::parse_error& ex) +catch (json::parse_error& ex) { std::cerr << "parse error at byte " << ex.byte << std::endl; } diff --git a/include/nlohmann/detail/exceptions.hpp b/include/nlohmann/detail/exceptions.hpp index 8ad5d123a..fc157a904 100644 --- a/include/nlohmann/detail/exceptions.hpp +++ b/include/nlohmann/detail/exceptions.hpp @@ -50,7 +50,6 @@ class exception : public std::exception { public: /// returns the explanatory string - JSON_HEDLEY_RETURNS_NON_NULL const char* what() const noexcept override { return m.what(); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index c43c5e798..54880efd6 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2637,7 +2637,6 @@ class exception : public std::exception { public: /// returns the explanatory string - JSON_HEDLEY_RETURNS_NON_NULL const char* what() const noexcept override { return m.what();