Skip to content

Commit 9deb8e1

Browse files
committed
[mod] [BREAKING] Switch to more flexible packer interface (wip)
This is a BREAKING change for anyone using a custom packer (i.e. anything besides the built-in :edn or transit packers). The OLD interface (IPacker): (pack [packer clj-val]) -> platform-binary/string (unpack [packer packed-val]) -> clj-val The NEW interface (IPacker2): (pack [packer websocket? clj-val cb-fn]) -> (cb-fn {:value platform-binary/string} or {:error platform-exception}) (unpack [packer websocket? packed-val cb-fn]) -> (cb-fn {:value clj-val or {:error platform-exception}) Motivation? The new interface supports: - Distinct un/packing for WebSocket and Ajax transit. - Proper support for binary packing, even over Ajax. - Async un/packing, opening a lot more options for client-side serialization and/or compression.
1 parent e74a97f commit 9deb8e1

File tree

3 files changed

+317
-322
lines changed

3 files changed

+317
-322
lines changed

0 commit comments

Comments
 (0)