From 5464054f65966f1d4408149b237fdf763691bc33 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 30 Jan 2024 10:45:32 +0100 Subject: [PATCH] Parsing of PaymentOption(s): there can be several of them --- library/src/configuration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/src/configuration.cpp b/library/src/configuration.cpp index 3514b3e..21b7ecb 100644 --- a/library/src/configuration.cpp +++ b/library/src/configuration.cpp @@ -334,7 +334,8 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json) else if (strcmp(inner_obj_name, "pop_daily_card_price") == 0) PaymentOption.pop_daily_card_price = k->value.GetInt(); else if (strcmp(inner_obj_name, "pop_business_hours") == 0) PaymentOption.pop_business_hours = k->value.GetInt(); else if (strcmp(inner_obj_name, "pop_time_step_config") == 0) PaymentOption.pop_time_step_config = k->value.GetInt(); - this->currentPaymentOptions = PaymentOption; + this->currentPaymentOptions.append(PaymentOption); + PaymentOption.reset(); break; case MemberType::DurationType: if (strcmp(inner_obj_name, "pun_id") == 0) Duration.pun_id = k->value.GetInt();