-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow Serialize/Deserialize into a JsValue
#96
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
Comments
I want to take a stab at this and have a couple of questions. Would you be in favor changing It's not apparent how we deal with objects and arrays right now (if at all). Would you mind providing some instructions for how that would work? |
Nah for now I'd like to leave I think that implementing this may actually be easiest to just convert straight to JSON, send that to JS, and then parse the object and return an index. Alternatively we could add accessors/creators to |
These functions are activated with the `serde-serialization` feature of the `wasm-bindgen` crate. When activated they will allow passing any arbitrary value into JS that implements the `Serialize` trait and receiving any value from JS using the `Deserialize` trait. The interchange between JS and Rust is JSON. Closes #96
These functions are activated with the `serde-serialization` feature of the `wasm-bindgen` crate. When activated they will allow passing any arbitrary value into JS that implements the `Serialize` trait and receiving any value from JS using the `Deserialize` trait. The interchange between JS and Rust is JSON. Closes #96
I've posted an initial pass of this API at #171 |
We should have an option to convert an arbitrary object to a
JsValue
viaSerialize
anDeserialize
. It may not be quick but it's often quite useful!The text was updated successfully, but these errors were encountered: