[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:
@@ -733,6 +733,17 @@
|
|||||||
((and (not in-section) (= trimmed "{")) nil)
|
((and (not in-section) (= trimmed "{")) nil)
|
||||||
((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": {
|
;; Section-Start: "name": {
|
||||||
((and (not in-inner) (vl-string-search ": {" trimmed))
|
((and (not in-inner) (vl-string-search ": {" trimmed))
|
||||||
(setq kv (ssg-cfg-parse-kv
|
(setq kv (ssg-cfg-parse-kv
|
||||||
|
|||||||
Reference in New Issue
Block a user