I am on a work to dynamically load Clojure functions from strings and parse them. Example:
Class.forName(RT.class.getName());
String fnText = "(defn foo [] (println \"foo1\"))";
PersistentList fnObj = (PersistentList) Clojure.read(fnText);
Symbol fnName = (Symbol) fnObj.get(1); // this is stupid
System.out.println(fnName.getName()); // prints "foo"
But fnObj.get(1) is not convenient. I am wondering is there a xpath like library in Java to manipulate the PersistentList returned from Clojure.read().
There's this java library called edn-java. Not super active (last commit was Oct 2015).
FWIW, its on the recommended list here:
https://github.com/edn-format/edn/wiki/Implementations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With