遇到了个问题
Exception in thread Thread-3:,
Traceback (most recent call last):,
File "/config/custom_components/switch/PhicommDC1.py", line 137, in parseJsonData,
return json.loads(jsonStr[l - 1]),
File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads,
return _default_decoder.decode(s),
File "/usr/local/lib/python3.7/json/decoder.py", line 340, in decode,
raise JSONDecodeError("Extra data", s, end),
json.decoder.JSONDecodeError: Extra data: line 1 column 121 (char 120),
报错时的jsonStr[l - 1]:
{"uuid":"7-7175750826426720","status":200,"result":{"status":1111,"I":475,"V":241,"P":58},"msg":"get datapoint success"}\n{"uuid":"kWh+5f80d7bf","status":200,"result":{"status":1111,"I":475,"V":241,"P":58},"msg":"get datapoint success"}
正则匹配到了两个json |