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

Support JsValue serialization #69

Closed
spoutn1k opened this issue Aug 6, 2024 · 3 comments
Closed

Support JsValue serialization #69

spoutn1k opened this issue Aug 6, 2024 · 3 comments

Comments

@spoutn1k
Copy link

spoutn1k commented Aug 6, 2024

Thank you for the great crate !

I am facing an issue and I'm not sure if it makes sense, but I have an object that contains some web_sys types, that essentially are JsValues. I was expecting to plug and play serde-wasm-bindgen, but the code would not compile because JsValue cannot be serialized as JsValue :/ Is it possible to make this happen ?

@RReverser
Copy link
Owner

@spoutn1k
Copy link
Author

spoutn1k commented Aug 6, 2024

Ok, so I have to create a struct for this ? My type is a tuple, I cannot use it directly ?

@RReverser
Copy link
Owner

If you mean that the JsValue is inside a tuple, then yes, it's currently not possible to apply serde(with) on nested types: serde-rs/serde#723

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

2 participants