utkarshkukreti / edn.rs

An EDN (Extensible Data Notation) parser in Rust.
48 stars 12 forks source link

Added support for namespaced maps ('#:ns'-prefix) #14

Open jasilven opened 4 years ago

jasilven commented 4 years ago

Hi! This patch implements support for namespaced maps that are used in Clojure (v. 1.9>). More info here: https://clojure.org/reference/reader#_maps.

bowbahdoe commented 2 years ago

Is that part of actual edn?

jasilven commented 2 years ago

Good question and actually it seems that it is not part of the EDN spec as namespaced maps are only supported by clojure 1.9->. I must have somehow interpreted namespaced maps to be aligned with "tagged elements" defined in EDN spec, but they are actually not exactly the same thing. Fortunately this addition should not break anything as it only expands the parser so that it is able to parse the output of clojure socket repl (which was my actual need for other project).