gnarroway / hato

An HTTP client for Clojure, wrapping JDK 11's HttpClient
MIT License
380 stars 27 forks source link

Using clojure.data.json instead of cheshire #52

Open rome-user opened 1 year ago

rome-user commented 1 year ago

Hi.

I typically use clojure.data.json for JSON parsing, since cheshire is quite heavy and its transitive dependencies often get CVEs. Would you be interested in a patch that allows users to supply data.json as a JSON parsing library instead? As far as I can tell, this library does not use functionality specific to cheshire.

fversnel commented 1 year ago

https://github.com/gnarroway/hato/blob/master/src/hato/middleware.clj#L69

json-encode and decode are dynamic so I guess you can override them in your own code. Still it would be nice to also have built-in support for data.json

rome-user commented 1 year ago

I'll write a patch soon. I have nothing against Cheshire, but I like being able to use data.json