首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

clojure.edn

完整名称空间名称:clojure.edn

概述

代码语言:javascript
复制
edn reading.

公共变量和函数

读函数

代码语言:javascript
复制
Usage: (read)
       (read stream)
       (read opts stream)
代码语言:javascript
复制
Reads the next object from stream, which must be an instance of
java.io.PushbackReader or some derivee.  stream defaults to the
current value of *in*.

Reads data in the edn format (subset of Clojure data):
http://edn-format.org

opts is a map that can include the following keys:
:eof - value to return on end-of-file. When not supplied, eof throws an exception.
:readers  - a map of tag symbols to data-reader functions to be considered before default-data-readers.
            When not supplied, only the default-data-readers will be used.
:default - A function of two args, that will, if present and no reader is found for a tag,
           be called with the tag and the value.

在Clojure版本1.5中添加

读-串函数

代码语言:javascript
复制
Usage: (read-string s)
       (read-string opts s)
代码语言:javascript
复制
Reads one object from the string s. Returns nil when s is nil or empty.

Reads data in the edn format (subset of Clojure data):
http://edn-format.org

opts is a map as per clojure.edn/read

在Clojure版本1.5中添加

扫码关注腾讯云开发者

领取腾讯云代金券