media-io / yaserde

Yet Another Serializer/Deserializer
MIT License
174 stars 58 forks source link

why not support struct with generic?? quick_xml can do it!!! #187

Open xfront opened 2 months ago

xfront commented 2 months ago
#[derive(Serialize, YaSerialize, Debug)]
    struct Envelop<T> {
        body: T,
    }

 struct Envelop<T> {
    |            ^^^^^^^ -
help: add missing generic argument
    |
147 |     struct Envelop<T><T> {
    |                   +++
mtorromeo commented 2 months ago

See #156

antis81 commented 1 month ago

I ended up using quick_xml/serde for deserialization and yaserde for serialization (into a custom format). Serialization into formats other than XML is where yaserde shines. :sun_with_face:

(for reference/example here is my public code on gitlab https://gitlab.com/antis81/many-ui)

MarcAntoine-Arnaud commented 1 month ago

Generics are now supported via https://github.com/media-io/yaserde/pull/189 It's available in latest published version (0.10.1)