From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 7 Sep 2023 22:02:27 -0700 Subject: [PATCH 2/4] Make serializer public --- include/nlohmann/detail/output/serializer.hpp | 4 +++- include/nlohmann/json.hpp | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp index ed20b0d9e183b940d689d712d9e4b2de0b72017e..8bfe47a248d726e929053aa752a25d2fb4022f9b 100644 --- a/include/nlohmann/detail/output/serializer.hpp +++ b/include/nlohmann/detail/output/serializer.hpp @@ -373,7 +373,7 @@ class serializer } } - JSON_PRIVATE_UNLESS_TESTED: + public: /*! @brief dump escaped string @@ -696,6 +696,7 @@ class serializer return false; } + public: /*! @brief dump an integer @@ -876,6 +877,7 @@ class serializer } } + private: /*! @brief check whether a string is UTF-8 encoded diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 95d6bf1dd9d8bae1c87db8fb647c734e9c71f327..8ece57d4a0fde54b24fb6985d9b455b12df835ac 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -157,10 +157,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec using binary_reader = ::nlohmann::detail::binary_reader; template using binary_writer = ::nlohmann::detail::binary_writer; - JSON_PRIVATE_UNLESS_TESTED: + public: using serializer = ::nlohmann::detail::serializer; - public: using value_t = detail::value_t; /// JSON Pointer, see @ref nlohmann::json_pointer using json_pointer = ::nlohmann::json_pointer;