|
3394 | 3394 | Note that read can execute code (controlled by *read-eval*),
|
3395 | 3395 | and as such should be used only with trusted sources.
|
3396 | 3396 |
|
3397 |
| - For data structure interop use read-edn" |
| 3397 | + For data structure interop use clojure.edn/read" |
3398 | 3398 | {:added "1.0"
|
3399 | 3399 | :static true}
|
3400 | 3400 | ([]
|
|
3421 | 3421 | Note that read-string can execute code (controlled by *read-eval*),
|
3422 | 3422 | and as such should be used only with trusted sources.
|
3423 | 3423 |
|
3424 |
| - For data structure interop use read-edn-string" |
| 3424 | + For data structure interop use clojure.edn/read-string" |
3425 | 3425 | {:added "1.0"
|
3426 | 3426 | :static true}
|
3427 | 3427 | [s] (clojure.lang.RT/readString s))
|
3428 | 3428 |
|
3429 |
| -(defn read-edn |
3430 |
| - "Reads the next object from stream, which must be an instance of |
3431 |
| - java.io.PushbackReader or some derivee. stream defaults to the |
3432 |
| - current value of *in*. |
3433 |
| -
|
3434 |
| - Reads data in the edn format (subset of Clojure data): |
3435 |
| - http://edn-format.org |
3436 |
| -
|
3437 |
| - opts is a map that can include the following keys: |
3438 |
| - :eof - value to return on end-of-file. When not supplied, eof throws an exception. |
3439 |
| - :readers - a map of tag symbols to data-reader functions to be considered before default-data-readers. |
3440 |
| - When not supplied, only the default-data-readers will be used. |
3441 |
| - :default - A function of two args, that will, if present and no reader is found for a tag, |
3442 |
| - be called with the tag and the value." |
3443 |
| - |
3444 |
| - {:added "1.5"} |
3445 |
| - ([] |
3446 |
| - (read-edn *in*)) |
3447 |
| - ([stream] |
3448 |
| - (read-edn {} stream)) |
3449 |
| - ([opts stream] |
3450 |
| - (clojure.lang.EdnReader/read stream opts))) |
3451 |
| - |
3452 |
| -(defn read-edn-string |
3453 |
| - "Reads one object from the string s. Returns nil when s is nil or empty. |
3454 |
| -
|
3455 |
| - Reads data in the edn format (subset of Clojure data): |
3456 |
| - http://edn-format.org |
3457 |
| -
|
3458 |
| - opts is a map as per read-edn" |
3459 |
| - {:added "1.5"} |
3460 |
| - ([s] (read-edn-string {:eof nil} s)) |
3461 |
| - ([opts s] (when s (clojure.lang.EdnReader/readString s opts)))) |
3462 |
| - |
3463 | 3429 | (defn subvec
|
3464 | 3430 | "Returns a persistent vector of the items in vector from
|
3465 | 3431 | start (inclusive) to end (exclusive). If end is not supplied,
|
|
5918 | 5884 | "Defaults to true (or value specified by system property, see below)
|
5919 | 5885 | ***This setting implies that the full power of the reader is in play,
|
5920 | 5886 | including syntax that can cause code to execute. It should never be
|
5921 |
| - used with untrusted sources. See also: read-edn.*** |
| 5887 | + used with untrusted sources. See also: clojure.edn/read.*** |
5922 | 5888 |
|
5923 | 5889 | When set to logical false in the thread-local binding,
|
5924 | 5890 | the eval reader (#=) and record/type literal syntax are disabled in read/load.
|
|
0 commit comments