DEV Community

Discussion on: How to seamlessly exchange data between JavaScript environments

Collapse
wynntee profile image
Wynn Tee Author

MessagePack is more general-purpose covering more languages. JOSS is specific to JavaScript and its idiosyncrasies.

For example, in JavaScript both Object and Map are associative arrays. So if you used a Map on the client-side, JOSS will ensure you get a Map (as opposed to Object) on the server-side.

There are also the little things like primitive wrapper objects, sparse arrays, and signed zeros. They might not be important to some, but the point is JOSS will ensure they're reproduced.

When Temporal becomes an official part of JavaScript, JOSS will also support that in addition to Date. Hope that answers your question.