2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

fhem.pl: light fixes for json2namevalue (Forum #41439)

git-svn-id: https://svn.fhem.de/fhem/trunk@17516 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2018-10-12 14:56:42 +00:00
parent 6e8b0b07ea
commit 531151c0a2

View File

@ -4988,7 +4988,8 @@ json2nameValue($;$)
while($val) {
$val = eObj($ret, $name."_$idx", $val, $val, $prefix);
$val =~ s/^\s*,\s*//;
$idx++
$val =~ s/\s*$//;
$idx++;
}
} elsif($val =~ m/^([0-9.-]+)(.*)$/s) {
$ret->{"$prefix$name"} = $1;
@ -4999,7 +5000,7 @@ json2nameValue($;$)
$in = $2;
} else {
Log 1, "Error parsing $val";
Log 1, "Error parsing >$val< for $prefix$name";
$in = "";
}
return $in;