feat: jsonista-style production JSON example

- Добавени JSON runtime функции в cljnim_runtime.nim
  (write-value-as-string, read-value, file I/O, keyword-keys, pretty print)
- Регистрирани json/* функции в emitter.nim
- Създаден production пример examples/jsonista.clj
  (моделиран след metosin/jsonista, без Java зависимости)
- Добавен README examples/jsonista.md
- Поправен cljGetIn да приема vectors
- Поправен cljOptBool за ?-suffixed ключове
- Добавен пример в Makefile check
- Обновен .gitignore
This commit is contained in:
2026-05-11 10:54:29 +03:00
parent 456636700c
commit 55f0cd842c
6 changed files with 435 additions and 4 deletions
+8 -1
View File
@@ -363,6 +363,11 @@ proc runtimeName(op: string): string =
of "ref-set": "cljRefSet"
of "dosync": "cljDosync"
of "alter": "cljAlter"
# ---- JSON operations (jsonista-style) ----
of "json/write-value-as-string": "cljJsonWriteString"
of "json/read-value": "cljJsonReadString"
of "json/write-value-to-file": "cljJsonWriteFile"
of "json/read-value-from-file": "cljJsonReadFile"
else: ""
proc emitFnAsProc(items: seq[CljVal], indent: int): string =
@@ -1842,7 +1847,9 @@ proc emitSpecialForm(items: seq[CljVal], indent: int): string =
"require", "eval", "resolve", "random-uuid",
"vreset!", "restart-agent", "with-out-str",
"System/getProperty",
"dosync", "alter"]
"dosync", "alter",
"json/write-value-as-string", "json/read-value",
"json/write-value-to-file", "json/read-value-from-file"]
var call: string
if variadic: