I'm implementing basic end-to-end functionality from an HTML5 app to a Datomic database. The first port-of-call is to have the client make an AJAX call directly to the Datomic REST API (http://docs.datomic.com/rest.html).
The problem that needs to be solved with this approach is that the data comes back in EDN whereas the client application wants to use JSON.
I can see there are possible ways of doing it using Javascript on the client, for example, use some library code to do translate the EDN (as an example, I found jsedn - https://www.npmjs.com/package/jsedn)
Does anyone have experience of doing something that worked like this, using Javascript? Alternatively, is it more generally accepted that EDN to JSON should be done in the Clojure/Clojurescript arena (client- or server-side) such as outlined in http://swannodette.github.io/2014/07/26/transit--clojurescript/ ?
Thanks
Phil
[Edit 04-Mar-15 - a clarification: By client-side Clojurescript I'm thinking of something like taking CLJS code that transforms EDN to JSON, compiling it down to JS then using it as a client side library.]