Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 Hiccup 字符串解析为 Hiccup 节点?
例如, "[:b 'hello world']"进入[:b "hello world"]
"[:b 'hello world']"
[:b "hello world"]
使用 reader 将字符串转换为数据结构:
user=> (clojure.edn/read-string "[:b 'hello world']") [:b 'hello world']
您应该使用"来表示字符串:
"
user=> (clojure.edn/read-string "[:b \"hello world\"]") [:b "hello world"]