Skip to content
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

Don't quote MessagePack scalar values at the top level #31

Open
nyoung-figly opened this issue May 23, 2016 · 0 comments
Open

Don't quote MessagePack scalar values at the top level #31

nyoung-figly opened this issue May 23, 2016 · 0 comments

Comments

@nyoung-figly
Copy link

nyoung-figly commented May 23, 2016

It seems like the MessagePack transit writer quotes scalar values at the top level. Reading through the spec: https://github.com/cognitect/transit-format#quoting it seems like there's a good reason for doing this for JSON, but I'm not sure that same reason carries over into MessagePack, especially since users of the binary protocol might be more space conscious?

(def bs (java.io.ByteArrayOutputStream.))
(def writer (transit/writer bs :msgpack))
(transit/write writer 42)
(do (doseq [b (.toByteArray bs)] (printf "%02x " b)) (println))
;; => 92 a3 7e 23 27 2a
;; which is a quoted value, I'd like it to be the single byte 0x2a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant