encode_json in a eval

This commit is contained in:
Marko Oldenburg 2018-03-11 20:32:51 +01:00
parent 59f0e524a8
commit 3413baa41f

View File

@ -67,7 +67,7 @@ use Blocking;
my $version = "2.0.1"; my $version = "2.0.2";
@ -818,7 +818,7 @@ sub LGTV_WebOS_ResponseProcessing($$) {
return; return;
} }
my $decode_json = decode_json(encode_utf8($json)); my $decode_json = eval{decode_json(encode_utf8($json))};
if($@){ if($@){
Log3 $name, 3, "LGTV_WebOS ($name) - JSON error while request: $@"; Log3 $name, 3, "LGTV_WebOS ($name) - JSON error while request: $@";
return; return;