Re: Recursively convert Java Map to Clojure Map

2020-01-31 Thread Jason Ross
Thanks for the reply. I do need to convert to java hashmaps and arraylists because I'm trying to duplicate the testing of a clojure workflow being run on a server thats pushing pure java context through it. So in my tests I define a clojure map but want to javafy it to force errors to happen

Re: Recursively convert Java Map to Clojure Map

2020-01-31 Thread Alex Miller
You don't need that - Clojure maps *are* Java maps (they implement java.util.Map) and you can pass them into most Java APIs as is (with the caveat that they are made for reading, not for writing). If you did really want to convert them to hash-maps or whatever, it's pretty easy to do so with a

Re: Recursively convert Java Map to Clojure Map

2020-01-31 Thread Jason Ross
Hey I know this is super old post but what would the reverse look like, eg. recursively convert Clojure to java map On Saturday, October 15, 2011 at 4:10:32 AM UTC-5, Baishampayan Ghose wrote: > > > I have a Java Map contains Map of Maps/List (JSON like map) and have > > to convert to Clojure

Re: Recursively convert Java Map to Clojure Map

2011-10-16 Thread Chouser
On Sun, Oct 16, 2011 at 1:51 AM, Baishampayan Ghose b.gh...@gmail.com wrote: On Sun, Oct 16, 2011 at 11:16 AM, Jestan Nirojan jestanniro...@gmail.com wrote: Your solution worked, about 4x~5x improvement. Thanks a lot BG. Glad that it worked for you, Jestan. Protocols are usually the right

Re: Recursively convert Java Map to Clojure Map

2011-10-15 Thread Baishampayan Ghose
I have a Java Map contains Map of Maps/List (JSON like map) and have to convert to Clojure map (This happens at Java - Clojure Interop), So I have written a converter function 'as-clj-map' by modifying the clojure walk functions, It works fine, but consume lot of cpu when the data structure

Re: Recursively convert Java Map to Clojure Map

2011-10-15 Thread Jestan Nirojan
Your solution worked, about 4x~5x improvement. Thanks a lot BG. regards. -Jestan Nirojan On Oct 15, 2:10 pm, Baishampayan Ghose b.gh...@gmail.com wrote: I have a Java Map contains Map of Maps/List (JSON like map) and have to convert to Clojure map (This happens at Java - Clojure Interop),

Re: Recursively convert Java Map to Clojure Map

2011-10-15 Thread Baishampayan Ghose
On Sun, Oct 16, 2011 at 11:16 AM, Jestan Nirojan jestanniro...@gmail.com wrote: Your solution worked, about 4x~5x improvement. Thanks a lot BG. Glad that it worked for you, Jestan. Protocols are usually the right approach for these kind of tasks. Regards, BG -- Baishampayan Ghose b.ghose at