From c10bc7efdd2082f1b9cd2e65aa967e03cbc5c4d1 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 6 May 2020 22:13:08 +0200 Subject: [PATCH] :fire: remove pretty-print code for binary values --- include/nlohmann/detail/output/serializer.hpp | 21 ------------------- single_include/nlohmann/json.hpp | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp index f83f4a37..da544fad 100644 --- a/include/nlohmann/detail/output/serializer.hpp +++ b/include/nlohmann/detail/output/serializer.hpp @@ -251,27 +251,6 @@ class serializer { o->write_characters("b[]", 3); } - else if (pretty_print) - { - o->write_characters("b[", 2); - for (auto i = val.m_value.binary->cbegin(); - i != val.m_value.binary->cend() - 1; ++i) - { - dump_integer(*i); - o->write_character(','); - if (std::distance(val.m_value.binary->cbegin(), i) % 16 == 0) - { - o->write_character('\n'); - } - else - { - o->write_character(' '); - } - } - - dump_integer(val.m_value.binary->back()); - o->write_character(']'); - } else { o->write_characters("b[", 2); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index f8986c1d..93f6e7c9 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -14905,27 +14905,6 @@ class serializer { o->write_characters("b[]", 3); } - else if (pretty_print) - { - o->write_characters("b[", 2); - for (auto i = val.m_value.binary->cbegin(); - i != val.m_value.binary->cend() - 1; ++i) - { - dump_integer(*i); - o->write_character(','); - if (std::distance(val.m_value.binary->cbegin(), i) % 16 == 0) - { - o->write_character('\n'); - } - else - { - o->write_character(' '); - } - } - - dump_integer(val.m_value.binary->back()); - o->write_character(']'); - } else { o->write_characters("b[", 2);