-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write-read roundtrip results in different value, when key of a map is a decimal #36
Comments
The code you provided doesn't run as/is (the constructors to writer and reader take output and input streams in addition to the format key), and here's what I get when I run this with code that runs: (for [t [:json :json-verbose]]
(let [o (ByteArrayOutputStream. 2000)
w (writer o t)]
(write w {0.5 0})
(.toString o)))
;; => ("[\"^ \",\"~d0.5\",0]" "{\"~d0.5\":0}")
(for [t [:json :json-verbose :msgpack]]
(let [o (ByteArrayOutputStream. 2000)
w (writer o t)]
(write w {0.5 0})
(let [i (ByteArrayInputStream. (.toByteArray o))
r (reader i t)]
(read r))))
;; => ({0.5 0} {0.5 0} {0.5 0}) Can you provide a repro that I can run and watch behave the way you're saying? Maybe you're using some other stream implementations? |
This issue is in the wrong repo.. My bad. I use transit in clojurescript. Not clojure. Is there a way to move issues in Github? |
Not that I know of. I think you'll just have to open a new issue in transit-cljs. |
PS - I'd do it, but I think it's better if it comes from you so you can track it, etc. |
My test generator found following, wrong behavior.
Version: [com.cognitect/transit-cljs "0.8.239"]
The text was updated successfully, but these errors were encountered: