I'm trying to parse a nested structure of PriorityMaps:
(def reader-map
{
'util/pm (fn [x] (println "reading > " x) (parse-map x))
})
(binding [*data-readers* reader-map]
(clojure.core/read-string "#util/pm \"{:z 4 :y #util/pm \"{:y 3 :x 3}\" :x 9}\""))
...but I don't see the nested string passed into my handler as I'd expect, only the string up to the first nested tag:
reading > {:z 4 :y #er.util.net/pm
what am doing wrong ?
You need more backslashes if you want nested quotes:
(binding [*data-readers* reader-map]
(clojure.core/read-string "#util/pm \"{:z 4 :y #util/pm \\\"{:y 3 :x 3}\\\" :x 9}\""))
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