Hi All, I am running the following
(defn json-response [data & [status]] {:status (or status 200) :headers {"Content-Type" "application/json"} :body (json/generate-string data)}) (GET "/events/s3" [] (let [response (s3files/fetch-data-aws)] (println response) (json-response response))) ;;Function to fetch data is the following (defn fetch-data-aws [] (let [objs (s3/list-objects credentials bucket-name)] ;(println "Fetching S3 files.") ;(println objs) (doseq [item (:objects objs)] ;(println (map? item)) ;(println (:key item)) (let [theKey (:key item)] ;(println (s3/get-object credentials bucket-name theKey)) (let [in (:content (s3/get-object credentials bucket-name theKey))] (with-open [rdr (io/reader in)] (let [event (reduce conj [] (line-seq rdr))] (println event) event ))))))) it returns : (it is fine) [{"data":"text"} {"data":"text"} {"data":"text2"} {"data":"ex001"} {"data":"xyz"} {"data":"xyz"} {"data":"xyz"} {"data":"xyz"} {"data":"xyz"} {"data":"test123"} {"data":"test345"}] but when I render the page I get * * *null* * * *Any ideas of how can I return the right value ???* -- 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