serde-wasm-bindgen
serde-wasm-bindgen copied to clipboard
Add `to_value_with`
This allows Serializer::serialize_maps_as_objects
to actually be used.
This allows
Serializer::serialize_maps_as_objects
to actually be used.
It can already be used via value.serialize(...)
.
True. If that's the preferred way, then it should be documented somewhere.
Hm. It's the standard Serde method, it seemed unnecessary to also document it in just another one of Serde's implementations.
My intent is that a full example of how to activate serialize_maps_as_objects
should be present somewhere. While serialize
is indeed a standard serde method, most cases of serialization use the shortcuts provided by the various libraries.
If you prefer I could add such an example to the main module docstrings in #26 .
Adding a doc comment makes sense. Let's add it in a separate PR though, it's a lot easier to review bite-sized changes :)
Sure, then I'll add it to the module docstring and README once the other PRs are merged (if you merge them :laughing: )
I'm going to close this as per the old discussion above. If you think the docs need to call out the .serialize()
method, let's do that in a separate PR.