Skip to content

Commit 48d8b53

Browse files
worm2fedkrvital
andcommitted
fix(#4): use another json library
This is needed because with `cheshire` native build is failing due some classes initialization during build instead of runtime. Co-authored-by: @krvital <[email protected]>
1 parent 0638485 commit 48d8b53

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Diff for: deps.edn

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{:paths ["src"]
2-
:deps {cheshire/cheshire {:mvn/version "5.11.0"}
3-
com.github.clj-easy/graal-build-time {:mvn/version "0.1.4"}
4-
com.health-samurai/matcho {:mvn/version "0.3.11"}
5-
org.clojure/clojure {:mvn/version "1.11.3"}
6-
org.clojure/tools.cli {:mvn/version "1.1.230"}}
2+
:deps {com.github.clj-easy/graal-build-time {:mvn/version "0.1.4"}
3+
org.clojure/clojure {:mvn/version "1.11.3"}
4+
org.clojure/data.json {:mvn/version "2.5.0"}
5+
org.clojure/tools.cli {:mvn/version "1.1.230"}}
76

87
:aliases
98
{:dev {:extra-paths ["dev"]}
109
:test {:extra-paths ["tests"]
11-
:deps {}}
10+
:deps {com.health-samurai/matcho {:mvn/version "0.3.11"}}}
1211

1312
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.4"}}
1413
:ns-default build}}}

Diff for: src/aidbox_sdk/generator.clj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(ns aidbox-sdk.generator
22
(:refer-clojure :exclude [namespace])
33
(:require
4-
[cheshire.core :as json]
4+
[clojure.data.json :as json]
55
[aidbox-sdk.generator.dotnet.templates :as dotnettpl]
66
[aidbox-sdk.generator.helpers :refer [->pascal-case safe-conj
77
uppercase-first-letter vector-to-map]]
@@ -713,7 +713,7 @@
713713
(->> rdr
714714
line-seq
715715
(mapv (fn [line]
716-
(json/parse-string line keyword))))))
716+
(json/read-str line :key-fn keyword))))))
717717

718718
(defn merge-duplicates [schemas]
719719
(->> schemas

0 commit comments

Comments
 (0)