perf: 优化 csv parse

This commit is contained in:
ibuler
2023-03-14 14:12:42 +08:00
parent c4945b3563
commit 4c24e95b47
2 changed files with 6 additions and 2 deletions

View File

@@ -91,7 +91,11 @@ class BaseFileParser(BaseParser):
(col.startswith('[') and col.endswith(']')) or
(col.startswith("{") and col.endswith("}"))
):
col = json.loads(col)
try:
col = json.loads(col)
except json.JSONDecodeError as e:
logger.error('Json load error: ', e)
logger.error('col: ', col)
new_row.append(col)
return new_row