I am trying to build a rest webservice using compojure/ring and json marshalling. the consumers of the web service are written in java and we are thinking of using apache cxf. when i am trying to send an object using jsonprovider , it is getting correctly parsed at the client end but on using ring.middleware.json- params and passing a multi-level map, the map kinds of gets unreadable . My method is the reference cabinet http://mmcgrana.github.com/2010/08/clojure-rest-api.html for name when I use curl -X PUT -H "Content-Type: application/json" \ -d '{"name": "hacker"}' \ http://localhost:8080/ ,it works fine but suppose I use '{"name": {"part1" : "part2"}}, we have a problem. {"part1":"part2"} becomes {part1 part2} instead of {"part1" "part2"} or {:part1 "part2"} so that I can use (:part1 name) in the put method or ("part1" name). I tried over riding the json- params file by using read-json of clojure contrib but it parsed the input as {:part1 part2}. this will wrk fine for clojure part of it but I am building a content generation service which will pass some maps to ftl. hence {:part1 part2} wont wrk there. Interestingly, (.get name "part1") while ("part1" name) does not work. Furthur testing the webservice using ff-plugin wrk as {"part1" "part2"}. However on using cxf JaxrsClientFactory and curl, it does not work any ideas ???
I am just a week old to clojure so, I might be asking very trivial questions. -- 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