From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 7 Sep 2023 22:02:27 -0700 Subject: [PATCH 2/5] 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 3137f3c3602c8aefa4a1e4947e1f17e836e91eb6..3a8e6c18f64035670886089c924bd322acc673a8 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 ed51cd544748c4b8ebabbd5bf32fd0bb1ef89738..491351330ba7a5994a750027c5766ae769e0b164 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -158,10 +158,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;