Does WASM have a data format (alternative to JSON / Protocol Buffers)? #1756
matthew-dean
started this conversation in
Ideas
Replies: 2 comments
-
The data in the Wasm binary format is generally uninterpreted bytes or raw integers or strings. There's not enough high-level structure there for any subset of it to be useful for the same kinds of things JSON is useful for. Someone could create a new serialization format that reuses the same binary encodings that Wasm uses, but that would not be in-scope for WebAssembly itself. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The component model's interface types have a value encoding, and it is used by (for example) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Because WASM is a compact binary format, and because WASM is generally available in browsers, I've been fully expecting for there to be a subset format to replace JSON for data APIs (which could be called from JS or WASM), similar to how JSON is a subset of JS / JavaScript objects. However, I've been surprised that no such format has yet emerged, when it seems like such an obvious evolution away from JSON, which is not efficient at all, and is limited in its feature set.
Anyone know of any work in this area?
Beta Was this translation helpful? Give feedback.
All reactions