oknozor / musicbrainz_rs

A wrapper around the musicbrainz API
MIT License
38 stars 18 forks source link

rename_all serialisation/deserialization inconsistency #88

Open vulpivia opened 2 months ago

vulpivia commented 2 months ago

Is there a reason why Serde's rename_all is only specified for deserialization? This messes up serialisation/deserialization of any structs that use MusicBrainz entities in their fields, since the fields of the entities don't match.

RustyNova016 commented 2 months ago

I guess this crate had only in mind a one way deserialization from MB's API, and don't care about being able to feed back its own data. I stumbled upon it and motivated me to redo the structs to have a flat design instead of nested relations.

Although this does bring the question, would it be better to serialize using MB's fields, or keep Rust fields but still able to deserialize from them?