From 3691042b6ec9a725b372f5b2724c60c53fb82f30 Mon Sep 17 00:00:00 2001 From: Pcornat Date: Fri, 14 Jan 2022 23:03:22 +0100 Subject: [PATCH] Better serializer --- include/characteristic/characteristic.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/characteristic/characteristic.hpp b/include/characteristic/characteristic.hpp index d3fadc2..803f432 100644 --- a/include/characteristic/characteristic.hpp +++ b/include/characteristic/characteristic.hpp @@ -39,10 +39,10 @@ namespace character::characteristic { }; void to_json(json &j, const Characteristic &charac) { - j.emplace("base", charac.get_base()); - j.emplace("carac", charac.get_carac()); - j.emplace("materiel", charac.get_materiel()); - j.emplace("additional", charac.get_additional()); + j["base"] = charac.get_base(); + j["carac"] = charac.get_carac(); + j["materiel"] = charac.get_materiel(); + j["additional"] = charac.get_additional(); } }