rustemon icon indicating copy to clipboard operation
rustemon copied to clipboard

add Serialize to internal structs

Open GregHanson opened this issue 1 year ago • 2 comments

minor change, but could serde::Serialize be included with all PokeAPI structs? I'd like to be able to export the data I retrieve from the library to other tooling/libraries

GregHanson avatar Aug 13 '24 15:08 GregHanson

@GregHanson Hey there! Thanks for your contribution, it is much appreciated! Since you're the second one to ask for this feature, I'm willing to accept it. However, I'd prefer if it was behind a feature gate that is opt-out by default

mlemesle avatar Aug 16 '24 12:08 mlemesle

done! I think I did that right since my import of the branch compiles

GregHanson avatar Aug 16 '24 13:08 GregHanson

Thanks! I'll look into it as soon as possible when I come back from vacations!

mlemesle avatar Aug 20 '24 07:08 mlemesle

Hey @GregHanson !

Thanks for the contribution ! I reviewed it, it works and it's a nice addition to the crate, thanks ! You didn't put Serialize on every struct though, is there a reason for that ? Do you mind adding this to all structs that are already Deserialize ? I can merge it as is if you want, and I'll do it myself if you prefer.

Please let me know !

mlemesle avatar Aug 26 '24 10:08 mlemesle

you are right! that was my mistake. I think I got them all now

GregHanson avatar Aug 26 '24 20:08 GregHanson

Thanks for your contribution ! I'll make a release right away !

mlemesle avatar Aug 27 '24 08:08 mlemesle