From 47a50967ebc3d9a8b43d9c52d1849044ecf0a99d Mon Sep 17 00:00:00 2001 From: Kevin Xu Date: Tue, 7 Dec 2021 15:28:19 -0500 Subject: [PATCH] rename symbolifier to denumerizer --- .../{symbolifier.hpp => denumerizer.hpp} | 2 +- include/nlohmann/detail/output/serializer.hpp | 22 +++++++------- include/nlohmann/json_fwd.hpp | 6 ++-- single_include/nlohmann/json.hpp | 30 +++++++++---------- 4 files changed, 30 insertions(+), 30 deletions(-) rename include/nlohmann/detail/output/{symbolifier.hpp => denumerizer.hpp} (99%) diff --git a/include/nlohmann/detail/output/symbolifier.hpp b/include/nlohmann/detail/output/denumerizer.hpp similarity index 99% rename from include/nlohmann/detail/output/symbolifier.hpp rename to include/nlohmann/detail/output/denumerizer.hpp index 93a1d5a44..56147ed92 100644 --- a/include/nlohmann/detail/output/symbolifier.hpp +++ b/include/nlohmann/detail/output/denumerizer.hpp @@ -20,7 +20,7 @@ namespace nlohmann namespace detail { -struct symbolifier +struct denumerizer { using number_buffer_t = std::array; diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp index 268e20cb0..55391c8c8 100644 --- a/include/nlohmann/detail/output/serializer.hpp +++ b/include/nlohmann/detail/output/serializer.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include namespace nlohmann { @@ -39,7 +39,7 @@ enum class error_handler_t ignore ///< ignore invalid UTF-8 sequences }; -template +template class serializer { using string_t = typename BasicJsonType::string_t; @@ -263,10 +263,10 @@ class serializer for (auto i = val.m_value.binary->cbegin(); i != val.m_value.binary->cend() - 1; ++i) { - SymbolifierType::dump_integer(o, *i); + DenumerizerType::dump_integer(o, *i); o->write_characters(", ", 2); } - SymbolifierType::dump_integer(o, val.m_value.binary->back()); + DenumerizerType::dump_integer(o, val.m_value.binary->back()); } o->write_characters("],\n", 3); @@ -275,7 +275,7 @@ class serializer o->write_characters("\"subtype\": ", 11); if (val.m_value.binary->has_subtype()) { - SymbolifierType::dump_integer(o, val.m_value.binary->subtype()); + DenumerizerType::dump_integer(o, val.m_value.binary->subtype()); } else { @@ -294,16 +294,16 @@ class serializer for (auto i = val.m_value.binary->cbegin(); i != val.m_value.binary->cend() - 1; ++i) { - SymbolifierType::dump_integer(o, *i); + DenumerizerType::dump_integer(o, *i); o->write_character(','); } - SymbolifierType::dump_integer(o, val.m_value.binary->back()); + DenumerizerType::dump_integer(o, val.m_value.binary->back()); } o->write_characters("],\"subtype\":", 12); if (val.m_value.binary->has_subtype()) { - SymbolifierType::dump_integer(o, val.m_value.binary->subtype()); + DenumerizerType::dump_integer(o, val.m_value.binary->subtype()); o->write_character('}'); } else @@ -329,19 +329,19 @@ class serializer case value_t::number_integer: { - SymbolifierType::dump_integer(o, val.m_value.number_integer); + DenumerizerType::dump_integer(o, val.m_value.number_integer); return; } case value_t::number_unsigned: { - SymbolifierType::dump_integer(o, val.m_value.number_unsigned); + DenumerizerType::dump_integer(o, val.m_value.number_unsigned); return; } case value_t::number_float: { - SymbolifierType::dump_float(o, val.m_value.number_float); + DenumerizerType::dump_float(o, val.m_value.number_float); return; } diff --git a/include/nlohmann/json_fwd.hpp b/include/nlohmann/json_fwd.hpp index 6fc24a9f7..da1e92479 100644 --- a/include/nlohmann/json_fwd.hpp +++ b/include/nlohmann/json_fwd.hpp @@ -34,13 +34,13 @@ struct numerizer; template using basic_lexer = lexer; -struct symbolifier; +struct denumerizer; -template +template class serializer; template -using basic_serializer = serializer; +using basic_serializer = serializer; } template class ObjectType = diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index f34f855fb..6cd8381fa 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -3446,13 +3446,13 @@ struct numerizer; template using basic_lexer = lexer; -struct symbolifier; +struct denumerizer; -template +template class serializer; template -using basic_serializer = serializer; +using basic_serializer = serializer; } template class ObjectType = @@ -16495,7 +16495,7 @@ char* to_chars(char* first, const char* last, FloatType value) // #include -// #include +// #include #include // reverse, remove, fill, find, none_of @@ -16518,7 +16518,7 @@ namespace nlohmann namespace detail { -struct symbolifier +struct denumerizer { using number_buffer_t = std::array; @@ -16760,7 +16760,7 @@ enum class error_handler_t ignore ///< ignore invalid UTF-8 sequences }; -template +template class serializer { using string_t = typename BasicJsonType::string_t; @@ -16984,10 +16984,10 @@ class serializer for (auto i = val.m_value.binary->cbegin(); i != val.m_value.binary->cend() - 1; ++i) { - SymbolifierType::dump_integer(o, *i); + DenumerizerType::dump_integer(o, *i); o->write_characters(", ", 2); } - SymbolifierType::dump_integer(o, val.m_value.binary->back()); + DenumerizerType::dump_integer(o, val.m_value.binary->back()); } o->write_characters("],\n", 3); @@ -16996,7 +16996,7 @@ class serializer o->write_characters("\"subtype\": ", 11); if (val.m_value.binary->has_subtype()) { - SymbolifierType::dump_integer(o, val.m_value.binary->subtype()); + DenumerizerType::dump_integer(o, val.m_value.binary->subtype()); } else { @@ -17015,16 +17015,16 @@ class serializer for (auto i = val.m_value.binary->cbegin(); i != val.m_value.binary->cend() - 1; ++i) { - SymbolifierType::dump_integer(o, *i); + DenumerizerType::dump_integer(o, *i); o->write_character(','); } - SymbolifierType::dump_integer(o, val.m_value.binary->back()); + DenumerizerType::dump_integer(o, val.m_value.binary->back()); } o->write_characters("],\"subtype\":", 12); if (val.m_value.binary->has_subtype()) { - SymbolifierType::dump_integer(o, val.m_value.binary->subtype()); + DenumerizerType::dump_integer(o, val.m_value.binary->subtype()); o->write_character('}'); } else @@ -17050,19 +17050,19 @@ class serializer case value_t::number_integer: { - SymbolifierType::dump_integer(o, val.m_value.number_integer); + DenumerizerType::dump_integer(o, val.m_value.number_integer); return; } case value_t::number_unsigned: { - SymbolifierType::dump_integer(o, val.m_value.number_unsigned); + DenumerizerType::dump_integer(o, val.m_value.number_unsigned); return; } case value_t::number_float: { - SymbolifierType::dump_float(o, val.m_value.number_float); + DenumerizerType::dump_float(o, val.m_value.number_float); return; }