0

is there a way to create java objects from Clojure maps? something where the following would hold - (= my-map (bean (convert-to-object my-map)))

2 Answers 2

2

You would need to tell it what type of Java object you wanted to create. Take a look at the org.clojure/java.data Contrib library which can build Java objects from hash maps (via constructors, via property setters, via builders): https://github.com/clojure/java.data

Sign up to request clarification or add additional context in comments.

Comments

0

Take a look at https://github.com/uwcpdx/bean-dip

Bidirectional translation between Clojure maps and Java beans that's declarative and reflection-free

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.