I am getting a null pointer exception in the line where I conj into the vector. I added the pprint so I could see what was going on. I am confused by the outcome:
(defn convert-json-to-xml [json-as-flat-maps] (reduce (fn [vector-of-strings next-movie-as-map] (println "next move as map: ") (println (pp/pprint next-movie-as-map)) (if (seq next-movie-as-map) (conj vector-of-strings (xml/emit-str (xml/map->Element next-movie-as-map))) vector-of-strings)) [] json-as-flat-maps)) The pprint is showing me this: {:film_64209.9096316473 "513e67e3c07f5dd745000051", :cast_member_64209.9096316473 "5148c50dc07f5db42300003a", :title_64209.9096316473 "Sound design", :director "", :runtime "5", :movie-id "513e67e3c07f5dd745000051", :title "Two Islands", :thumb "https://s3.amazonaws.com/tribeca_cms_production/uploads/uploads/film/photo_1/513e67e3c07f5dd745000051/small_TWO_ISLANDS_2_pubs.jpg", :categories ["Documentary"], :youtube_url "", :website_url "", :name_64209.9096316473 "Svante Colérus", :description "Two Islands is film about two enormous waste dumps in New York City. The first was once the largest dump in the world. The other, a cemetery of unknowns, is still in use. Two Islands bluntly asks, what does the existence of these two huge mountains of economic and social waste and rejected surplus tell us about our civilization and the so-called richest nation in the world? What kind of legacy will future archaeologists see?"} Any thoughts about what triggers a null pointer exception? I am using this XML library: http://clojure.github.com/data.xml/ -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.