Fork me on GitHub
#beginners
<
2022-08-14
>
loganrios19:08:35

Is passing EDN over-the-wire considered a deprecated design implementation at this point? While browsing cljs-ajax, I noticed that its EDN parsing was marked as deprecated (https://github.com/JulianBirch/cljs-ajax/blob/master/docs/formats.md), while Transit and JSON seem to be the options with the best performance. I know you can technically respond with application/edn as your data type when writing HTTP servers, but is this not something that people really do anymore?

seancorfield19:08:46

Yes, people still use EDN over the wire. ClojureScript has clojure.edn for parsing it: http://cljs.github.io/api/clojure.edn/ -- but your choice depends on a number of things: is the back end Clojure or some other language? Is performance sufficiently critical to need Transit? Do you need more than just JSON?

👍 1
loganrios19:08:17

Ah, that makes sense. I'm currently trying to write a CLJS frontend and CLJ backend in parallel, so it seemed less obvious to me why others would want to pass a non-EDN type back and forth. Thanks so much!