如何将Hiccup的字符串解析为Hiccup节点?
例如,将"[:b 'hello world']"转换为[:b "hello world"]
发布于 2015-03-21 20:13:30
使用读取器将字符串转换为数据结构:
user=> (clojure.edn/read-string "[:b 'hello world']")
[:b 'hello world']您应该使用"来表示字符串:
user=> (clojure.edn/read-string "[:b \"hello world\"]")
[:b "hello world"]https://stackoverflow.com/questions/29179043
复制相似问题