Skip to content

Commit 2c60660

Browse files
committed
replace cheshire by jsonista (i.e. Jackson Core by Jackson Databind) for better performance
1 parent 34160ac commit 2c60660

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

project.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
:url "http://dkdhub.com"
44
:license {:name "MIT"}
55

6-
:dependencies [[cheshire "5.11.0"]
6+
:dependencies [[metosin/jsonista "0.3.7"]
77
[commons-io "2.11.0"]
88
[clj-time "0.15.2"]
99
[com.eaio.uuid/uuid "3.2"]
1010
[org.postgresql/postgresql "42.5.1"]]
1111

1212
:omit-source false
13-
:aot [libmisc-clj.jnio-proto])
13+
:aot [libmisc-clj.jnio-proto])

src-clj/libmisc_clj/convert.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
(ns libmisc-clj.convert
2-
(:require [cheshire.core :as json]))
2+
(:require [jsonista.core :as json]))
33

44
(defn json-response
55
([body] (json-response body 200))
66
([body code]
77
{:status code
88
:headers {"Content-Type" "application/json; charset=utf-8"}
9-
:body (json/generate-string body)}))
9+
:body (json/write-value-as-string body)}))
1010

1111
(defmacro json-error
1212
[msg code]
13-
`(json-response {:error ~msg} ~code))
13+
`(json-response {:error ~msg} ~code))

0 commit comments

Comments
 (0)