-
Notifications
You must be signed in to change notification settings - Fork 42
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
Deprecate the serde module #138
Conversation
I just found it being used in the snippets. |
Do you have another (name) suggestion to improve on this? A custom error like we had doesn't really follow the mantra we have with our general I'll merge this one now, but let's keep the above in mind and improve where we can. |
* Deprecate serde module * Rename errors to error * Add more payload conversion functions * Update documentation * Allow deprecated usage in serde tests * Move serde tests, fix deprecation warning
* Deprecate serde module * Rename errors to error * Add more payload conversion functions * Update documentation * Allow deprecated usage in serde tests * Move serde tests, fix deprecation warning
* Deprecate serde module * Rename errors to error * Add more payload conversion functions * Update documentation * Allow deprecated usage in serde tests * Move serde tests, fix deprecation warning
This deprecates the
serde
module and thePayloadConversionError
.Instead, this now recommends to use
Payload::from_json_object(value) -> Option<Payload>
. It seems to make more sense, and doesn't require a custom error type.This also adds more useful conversion. For example, to convert form
serde_json::Map
(a JSON object) intoPayload
because this cannot fail.All Submissions:
dev
branch. Did you create your branch fromdev
?New Feature Submissions:
cargo +nightly fmt --all
command prior to submission?cargo clippy --all --all-features
command?