Clojure & ClojureScript: clojure.core/read-string, clojure.edn/read-string and cljs.reader/read-string

后端 未结 3 2188
遥遥无期
遥遥无期 2020-12-25 12:15

I am not clear about the relationship between all these read-string functions. Well, it is clear that clojure.core/read-string can read any serialized string th

3条回答
  •  醉话见心
    2020-12-25 12:24

    Actually, it is possible to register custom tag parser via cljs.reader/register-tag-parser!

    for a record I have it looks like this: (register-tag-parser! (s/replace (pr-str m/M1) "/" ".") m/map->M1)

    @Gary — quite nice answer

提交回复
热议问题