While using plugin artfulcode/json.lsp version 2.0 I tried to build a string in json format (lisp->json function). It turned out that I can not pass variables in the expression (or I don't know how to do it).
Example:
Code: Select all
(setq var1 "some value")
(Json:lisp->json '(("var1" var1) ("a" 2) ("var2" '(("b" 3) ("c" (+ 2 2))))))
;; will result in -> { "var1": "var1", "a": 2, "var2": { "b": 3, "c": ["+", 2, 2] } }
Code: Select all
;; -> { "var1": "some value", "a": 2, "var2": { "b": 3, "c": 4 } }