clojure.core/read-string¶
Reads one object from the string s. Optionally include reader options, as specified in read.
Note that read-string can execute code (controlled by read-eval), and as such should be used only with trusted sources.
For data structure interop use clojure.edn/read-string
Examples¶
Note by boxie¶
read-string is useful for running clojure code from a script or translator.
Note by bfontaine¶
Never EVER use read-string on data from an untrusted source. Prefer clojure.edn/read-string to parse EDN. The former can execute arbitrary code, including calling external URLs or reading/writing/erasing files.
See also¶
- clojure.core/pr-str (3)
- clojure.core/str (7)
- clojure.core/read (0)
- clojure.core/load-string (0)
- clojure.core/*read-eval*
- clojure.main/load-script
- clojure.edn/read-string (0)
Content from the matching ClojureDocs page, with authors credited on each contribution.