From ec26b753a253bf92ad7451b685b95cbddcb75403 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:28:07 +0200 Subject: descriptions: fix bad json output (#11350) --------- Co-authored-by: Mihai Fufezan --- src/config/ConfigManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 337682dc..48c1d103 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -3210,8 +3210,8 @@ std::string SConfigOptionDescription::jsonify() const { "explicit": {})#", val.value, val.min, val.max, currentValue, EXPLICIT); } else if constexpr (std::is_same_v) { - return std::format(R"#( "value": {}, - "current": {}, + return std::format(R"#( "value": "{}", + "current": "{}", "explicit": {})#", val.color.getAsHex(), currentValue, EXPLICIT); } else if constexpr (std::is_same_v) { @@ -3220,7 +3220,7 @@ std::string SConfigOptionDescription::jsonify() const { "explicit": {})#", val.value, currentValue, EXPLICIT); } else if constexpr (std::is_same_v) { - return std::format(R"#( "value": {}, + return std::format(R"#( "value": "{}", "firstIndex": {}, "current": {}, "explicit": {})#", @@ -3257,7 +3257,7 @@ std::string SConfigOptionDescription::jsonify() const { {} }} }})#", - value, description, (uint16_t)type, (uint32_t)flags, parseData()); + value, escapeJSONStrings(description), (uint16_t)type, (uint32_t)flags, parseData()); return json; } -- cgit v1.2.3