Skip to content

Commit e0a0349

Browse files
committed
Remove unecessary duplicate logic
1 parent a608b59 commit e0a0349

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

examples/tv-app/android/java/ContentAppCommandDelegate.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -222,25 +222,6 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand
222222
{
223223
handlerContext.SetCommandHandled();
224224
Json::Value value;
225-
std::unique_ptr<Json::CharReader> testReader(readerBuilder.newCharReader());
226-
227-
if (!testReader->parse(response, response + std::strlen(response), &value, &errors))
228-
{
229-
ChipLogError(Zcl, "Failed to parse JSON: %s\n", errors.c_str());
230-
return;
231-
}
232-
233-
// Validate and access JSON data safely
234-
if (!value.isObject())
235-
{
236-
ChipLogError(Zcl, "Invalid JSON structure: not an object");
237-
return;
238-
}
239-
240-
if (!reader.parse(response, value))
241-
{
242-
return;
243-
}
244225

245226
// handle errors from platform-app
246227
if (!value[FAILURE_KEY].empty())

0 commit comments

Comments
 (0)