Skip to content

Commit 020fdc2

Browse files
committed
http: api: telemetry: support string array data type
1 parent c26ed82 commit 020fdc2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/enapter/http/api/telemetry/data_type.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import enum
2+
import json
23

34

45
class DataType(enum.Enum):
@@ -20,7 +21,7 @@ def parse_value(self, s: str) -> float | int | str | list[str] | bool | None:
2021
case DataType.STRING:
2122
return s
2223
case DataType.STRING_ARRAY:
23-
raise NotImplementedError(self)
24+
return json.loads(s)
2425
case DataType.BOOLEAN:
2526
if s.lower() in ("true", "1"):
2627
return True

0 commit comments

Comments
 (0)