From 13158385079f60ece7ccb6962306d773ea340421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 22 Jun 2026 07:48:01 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.98:=20=D1=88=D0=B0=D0=B36=20=E2=80=94=20el?= =?UTF-8?q?ements=5Fjson=20double-decode=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/convert_server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deploy/convert_server.py b/deploy/convert_server.py index 591d282..003aad7 100755 --- a/deploy/convert_server.py +++ b/deploy/convert_server.py @@ -144,9 +144,15 @@ class Handler(BaseHTTPRequestHandler): if not docs: continue ej = docs[0]["elements_json"] + # Lucee JSONB может вернуть: строку, dict-обёртку {Value,Type}, или уже список if isinstance(ej, dict) and "Value" in ej: ej = ej["Value"] - elements = json.loads(ej) + if isinstance(ej, str): + elements = json.loads(ej) + elif isinstance(ej, list): + elements = ej + else: + elements = [] # Lucee serializeJSON → UPPERCASE keys, normalize to lowercase elements = [{k.lower(): v for k, v in el.items()} for el in elements] lines = []