by fogus · 13y ago · 0 comments
In Clojure 1.5 there are EDN functions that handle a subset of the Clojure syntax and parse strings into data types like numbers, maps and vectors (and others). It's meant to deal with data only and not "reader forms". I wrote a Ring middleware to handle EDN data and recently ported it to use the new 1.5 EDN reader.
https://github.com/fogus/ring-edn/blob/master/src/ring/middl...
It looks almost exactly like the old clojure.core/read-string except it will not execute any dangerous code.