add serialize_with and deserialize_with attribute families for json/bin #114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds support for nanoserde's analogs for serde's
serialize_with
anddeserialize_with
field attributes.nanoserde is designed to translate directly between the serialized format the in-memory representation. This requires splitting the attribute into separate attributes for each of the target formats, instead of the singular
deserialize_with
orserialize_with
.For context, I'm porting a library from
serde
tonanoserde
to try to reduce binary size in a game I'm working on, and to facilitate that, I found it handy to bridge some of the feature gap between the libraries.Let me know if you're okay with contributions in this vein. I generally like to upstream new features when maintainers are interested.