Интегрирован wesp в сайт
CI / quality (push) Canceled after 0s

This commit is contained in:
влад
2026-07-17 12:57:18 +03:00
parent 5dfa06ddbe
commit 355c0ef9f1
883 changed files with 194576 additions and 177 deletions
@@ -0,0 +1,17 @@
from __future__ import annotations
import json
from typing import Any
def parse_json_text(value: Any, default: Any = None) -> Any:
if default is None:
default = {}
if value is None or value == "":
return default
if isinstance(value, dict):
return value
try:
return json.loads(value)
except (TypeError, json.JSONDecodeError):
return default