From e0a03497d56d576a0a768c992de568f27defb071 Mon Sep 17 00:00:00 2001 From: Lazar Kovacic Date: Fri, 9 Aug 2024 00:26:12 +0200 Subject: [PATCH] Remove unecessary duplicate logic --- .../java/ContentAppCommandDelegate.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index c93b131da7e6a4..02b4a7e806fefb 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -222,25 +222,6 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand { handlerContext.SetCommandHandled(); Json::Value value; - std::unique_ptr testReader(readerBuilder.newCharReader()); - - if (!testReader->parse(response, response + std::strlen(response), &value, &errors)) - { - ChipLogError(Zcl, "Failed to parse JSON: %s\n", errors.c_str()); - return; - } - - // Validate and access JSON data safely - if (!value.isObject()) - { - ChipLogError(Zcl, "Invalid JSON structure: not an object"); - return; - } - - if (!reader.parse(response, value)) - { - return; - } // handle errors from platform-app if (!value[FAILURE_KEY].empty())