[FIX] JSON Parser in Lisp konnte keine leeren JSON Attribut-Objekte behandeln (Kurve:{}) und hat einen Fehler geworfen. Dieses Verhalten wurde nun korrigiert

This commit is contained in:
2026-07-17 12:39:22 +02:00
parent d3ad4f8c5e
commit 659aa8e8c1
+11
View File
@@ -733,6 +733,17 @@
((and (not in-section) (= trimmed "{")) nil)
((and (not in-section) (= trimmed "}")) nil)
;; Leere Section auf einer Zeile: "name": {}
;; (Section-Start und -Ende zugleich - json.dump schreibt leere
;; Objekte immer inline, unabhaengig von der Einrueckung.)
((and (not in-inner)
(>= (strlen trimmed) 2)
(= (substr trimmed (1- (strlen trimmed)) 2) "{}"))
(setq section (substr trimmed 2
(1- (vl-string-search "\"" trimmed 1))))
(setq ergebnis (cons (cons section nil) ergebnis))
)
;; Section-Start: "name": {
((and (not in-inner) (vl-string-search ": {" trimmed))
(setq kv (ssg-cfg-parse-kv