From 72b0867dd2acabf76cd50ec2386bf1db6bd3ffad Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Fri, 22 Feb 2019 00:28:44 +0000 Subject: [PATCH] Behave like MK when there is no input --- mkreport.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mkreport.hpp b/mkreport.hpp index dca8142..ae5215a 100644 --- a/mkreport.hpp +++ b/mkreport.hpp @@ -239,7 +239,11 @@ bool dump(const Measurement &measurement, std::string &str, m["annotations"] = measurement.report.annotations; m["data_format_version"] = "0.2.0"; m["id"] = mk::uuid4::gen(); - m["input"] = measurement.input; + if (!measurement.input.empty()) { + m["input"] = measurement.input; + } else { + m["input"] = nullptr; + } m["input_hashes"] = nlohmann::json::array(); // conventional value m["measurement_start_time"] = measurement.start_time; m["options"] = nlohmann::json::array(); // conventional value