serde-json-core
serde-json-core copied to clipboard
Add support for writing to embedded_io::Write
trafficstars
Hello,
I think this feature is quite useful for many users.
It's feature-gated, so shall be harmless for others.
Dear maintainers, is there any problem with this one?
- I'm worried by the
dyn SerializerBackend.serde_json::Serializeris just generic overio::Write. That would be better. - It's missing the analogous
Deserializerchanges.
I'm not sure I fully understand the use case. Can you provide a small example of what you're looking to do in code that this enables?
In meantime I got better idea. We could add our own Read and Write traits, and then implement those traits for embedded_io::{Read, Write}. Serializer would be generic over Read and Deserializer over Write.
It would look like here