💄 Improve json namespace API (and fix linter).

This commit is contained in:
Andrey Antukh 2021-12-23 00:04:15 +01:00
parent 9554dfbc5e
commit 0ee34637f5
8 changed files with 34 additions and 33 deletions

View file

@ -358,7 +358,7 @@
val (.getValue o)]
(if (or (= typ "json")
(= typ "jsonb"))
(json/decode-str val)
(json/read val)
val)))
(defn decode-transit-pgobject
@ -394,7 +394,7 @@
[data]
(doto (org.postgresql.util.PGobject.)
(.setType "jsonb")
(.setValue (json/encode-str data))))
(.setValue (json/write-str data))))
;; --- Locks