Hello,

I am not sure if i am supposed to ask a noir-related question in the group 
but the noir issues at github <https://github.com/bitwalker/noir> is closed 
so i thought someone here might know. I am trying to use a custom 
encoder<https://github.com/bitwalker/noir/commit/6408d7028cae00937588b599b7c3305bb48e32fd>with
 noir.response but i am failing to understand how.  

This is what I am trying to do which at the moment fails of course:

(ns my-app.views.my-page
>
>   (:require [noir.response :as resp]))
>
>
>> (defpage "/my-page" []
>
>   (let [java-object (do-something)]
>
>   (resp/json java-object)))
>
>
The error message

Cannot JSON encode object of class: class-name-here - (class 
> org.codehaus.jackson.JsonGenerationException) 

 
It does work however if i use gson <http://code.google.com/p/google-gson/> on 
my java-object before i pass it to *resp/json *but i prefer to do it 
without gson. I am pretty sure its possible :)
*
*
Thank you for any replies
 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to