In [com.cognitect/transit-cljs "0.8.239"] using float/decimals as a key in a map doesn't roundtrip

31 views
Skip to first unread message

gijsst...@gmail.com

unread,
Oct 17, 2016, 11:05:12 AM10/17/16
to transit-format
Hi all,

In [com.cognitect/transit-cljs "0.8.239"] using float/decimals as a key in a map doesn't roundtrip:

(let [writer (transit/writer :json)
      reader (transit/reader :json)
      in {1 :a 2.3 :b}
      w (transit/write writer in)
      out (transit/read reader w)]
  (println (= in out) in out w) ;; false {1 :a, 2.3 :b} {1 :a, 2 :b} ["^ ","~i1","~:a","~i2.3","~:b"]
  )

I can't figure out from the documentation if this is supposed to work. It did surprise me, hence this post.

Cheers,
Gijs
Reply all
Reply to author
Forward
0 new messages