babashka 2026-09-18

I'm contemplating if I should add clojure.data.json to bb. I'm kinda tired of making shims that dispatch between JVM -> clojure.data.json and bb -> cheshire. It seems like the default lite JSON lib now that a lot of libraries use (like antq). It adds 66kb. Or I could add a shim (<1kb probably) that defers to cheshire (with test coverage to reduce the risk of changes).

👍 1
✅ 3

I'd vote to just add it personally, it's my defaultjson lib as well and worth the 66kb to me.

3

Since it got so many speedups, it's been my default JSON lib, and we worked hard to get rid of Jackson dependencies at work (including Cheshire). It's why https://github.com/seancorfield/ring-data-json exists too.

👍 2

i would vote for addition too, its the only dep that i have in my libs like https://github.com/lispyclouds/claxon and https://github.com/lispyclouds/contajners where the presence of data json necessitates a reader conditional, can drop all of that then. I never saw the need for any other json lib in 99% of my use cases.

yeah I measured with a shim around cheshire that it's 1.56x faster in some cases, but that still yields 49kb, not worth the risk

there is https://github.com/babashka/json which uses cheshire in bb and otherwise clojure.data.json but I think clojure.data.json is what people include in thin libraries anyway

👍🏻 1

clojure.data.json is it, soon on master

(one less diff for the antq bb support)

🎉 3

https://github.com/babashka/babashka/pull/2163 47 additions and 1,084 deletions (yeah, I now can run the tests from source instead of copying and patching them, bb supported an older version of clojure.data.json but since the perf improvements it couldn't anymore)

DELETE ALL THE THINGS! 😄

💯 1