From f58eb14a00d651ab0a88b5f2070fb842796bf443 Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Fri, 28 Oct 2022 12:59:54 +0300 Subject: [PATCH] fix: don't output null properties --- src/utils/json.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/json.cc b/src/utils/json.cc index 1311ec8..828f037 100644 --- a/src/utils/json.cc +++ b/src/utils/json.cc @@ -10,6 +10,7 @@ namespace ppc::data::json { out << '['; for (const auto &el : val.array()) { + if (el.is_null()) continue; if (!first) out << ','; first = false; out << stringify(el); @@ -21,6 +22,7 @@ namespace ppc::data::json { out << '{'; for (const auto &el : val.map()) { + if (el.second.is_null()) continue; if (!first) out << ','; first = false; out << '"' << el.first << '"' << ':' << stringify(el.second);