Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow named msgpack serialization #2107

Open
somehowchris opened this issue Feb 18, 2022 · 2 comments · May be fixed by #2566
Open

Allow named msgpack serialization #2107

somehowchris opened this issue Feb 18, 2022 · 2 comments · May be fixed by #2566
Labels
accepted An accepted request or suggestion good first issue Beginner-friendly for new contributors request Request for new functionality

Comments

@somehowchris
Copy link

Since @SergioBenitez is returning, imma pin that one here rocket-org#18 @Cloudef

Is your feature request motivated by a concrete problem? Please describe.

Currently the serde::msgpack::MsgPack included with rocket only does "compact serialization", meaning it doesn't serialize key names, only values in arrays. To be JSON compatible, and to avoid bugs it would be nice to have "named serialization".

Why this feature can't or shouldn't live outside of Rocket

The serde::msgpack is already in rocket.

Ideal Solution

It seems the problem is here: https://github.com/Rocket-org/Rocket/blob/cc0621626bf5e917ea1d4c1e29a327e9a7871921/core/lib/src/serde/msgpack.rs#L191 This should be changed to rmp_serde::to_vec_named, however since I'm still fairly new to rust, I don't know how this would be exposed so that the developer can choose either from the compact or named serialization form.

@somehowchris somehowchris added the request Request for new functionality label Feb 18, 2022
@SergioBenitez
Copy link
Member

See #1882 (comment).

@somehowchris
Copy link
Author

@Cloudef

@SergioBenitez SergioBenitez added the accepted An accepted request or suggestion label Mar 27, 2023
Artemis21 added a commit to Artemis21/Rocket that referenced this issue Jun 18, 2023
@Artemis21 Artemis21 linked a pull request Jun 18, 2023 that will close this issue
@SergioBenitez SergioBenitez added the good first issue Beginner-friendly for new contributors label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted An accepted request or suggestion good first issue Beginner-friendly for new contributors request Request for new functionality
Projects
None yet
2 participants