(with-meta "Hello" {:key 123})
java.lang.String cannot be cast to clojure.lang.IObj
[Thrown class java.lang.ClassCastException]
One solution that I found by Googling around is to extend the Java
class that I want to add meta data (String in this case) and have the
new class implement IObj. However, that solution requires me to
program in Java and seems like an overkill for the String class.
Is there a better & easier way to add meta-data to strings?
Sincerely,
Jung Ko
Thanks for the suggestion. Looks like there is no elegant way to add
meta data to strings. I ended up changing my functions slightly so
that I don't need to embed the meta data in the string.
Thanks,
Jung