How can I add json routes to the json handling routes to chestnut project?

Chestnut is pretty cool. I need to add in support of normal routes that expect and return json. But the server.clj is not the same as a typical handler generated by ‘lein compojure new’. Can anyone show me an example of a trivial handler GET route that response with a json body?

Thanks in advance.

Hey there!

You could do a similar thing to, except when you’re looking at (def http-handler)

I’m currently looking on a nice way to thread these like compojure’s examples do (and like the link above does) but you can do it now by just wrapping them outside, like (middleware/wrap-json-response (middleware/wrap-json-body (**current code**))