clojure-emacs / parseedn

EDN parser for Emacs Lisp
62 stars 15 forks source link

Can't read namespace maps #16

Closed dakra closed 1 year ago

dakra commented 1 year ago

I'm trying to parse some output from the datomic cli which uses namespace maps in it's output. Like:

 :dependency-conflicts
 {:deps
  {com.datomic/client-api #:mvn{:version "1.0.58"},
...

But parseedn doesn't seem to be able to read them. E.g.:

;; This is OK
(gethash :foo/bar (parseedn-read-str "{:foo/bar 23}"))
;;=> 23

;; This raises an error
(gethash :foo/bar (parseedn-read-str "#:foo{:bar 23}"))

;; Wrapped in a map, the error is gone but the :foo/bar part is nil
(gethash :x (parseedn-read-str "{:x #:foo{:bar 23}}"))
;;=> nil